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
Add HostProcess support for Calico for Windows #5864
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some comments
SetConfigParameters -OldString '<your datastore type>' -NewString $Datastore | ||
SetConfigParameters -OldString '<your etcd endpoints>' -NewString "$EtcdEndpoints" | ||
Set-ConfigParameters -var 'CALICO_DATASTORE_TYPE' -value $Datastore | ||
Set-ConfigParameters -var 'ETCD_ENDPOINTS' -value $EtcdEndpoints |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a proper lib function is a nice improvement.
|
||
Write-Host "Done, the Calico services are running:" | ||
Get-Service | where Name -Like 'Calico*' | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, maybe there is a better way?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed
node/calico-windows.yaml
Outdated
- name: install | ||
image: laurenceman/calico:latest | ||
args: | ||
- "$env:CONTAINER_SANDBOX_MOUNT_POINT\\install-calico-windows.ps1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See my comment above, I'm thinking we could construct a new script and keep install-calico-windows.ps1 with limited changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a entrypoint script to attempt uninstalling Calico for Windows, then starts the installation.
node/calico-windows.yaml
Outdated
exec: | ||
command: | ||
- c:\\CalicoWindows\\calico-node.exe | ||
- -felix-live |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have we tested the command on Windows? Is it working?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is working
@@ -13,7 +13,8 @@ | |||
# limitations under the License. | |||
|
|||
# This script is run from the main Calico folder. | |||
. .\config.ps1 | |||
# TODO: env vars will be set in the daemonset template spec. | |||
#. .\config.ps1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will it break manual installation after config.ps1 being removed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've reverted this
@@ -19,7 +19,7 @@ Param( | |||
|
|||
$baseDir = "$PSScriptRoot\.." | |||
. $baseDir\config.ps1 | |||
ipmo $baseDir\libs\calico\calico.psm1 | |||
ipmo $baseDir\libs\calico\calico.psm1 -Force |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is impact of --Force
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use -force
elsewhere when importing the calico module. If the module is already loaded, force will load it again. When we uninstall calico we do not currently remove the module but that's fixed with 6e73547
a58019a
to
8176616
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. A few comments. I still need some time to review install kubelet
part.
This sets the logging parameters for the kubelet service to be like what we currently use in our manual installation method.
curl {{ "/manifests/windows-kube-proxy.yaml" | absolute_url }} -o windows-kube-proxy.yaml | ||
``` | ||
- Edit the downloaded manifest | ||
- Replace `VERSION` with your Windows nodes' server version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
e.g. 1809
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed this and a few other small issues
Just a minor comment but LGTM. |
Add tech-preview of Calico for Windows installed using hostprocess containers
Description
This PR adds support for installing Calico for Windows using HostProcess containers.
Preview: https://deploy-preview-5864--calico-master.netlify.app/getting-started/windows-calico/quickstart
Related issues/PRs
Todos
Release Note