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

Add scripts/manifests for new daemonset kubeadm approach #34

Merged
merged 18 commits into from
Feb 27, 2020

Conversation

benmoss
Copy link
Contributor

@benmoss benmoss commented Feb 24, 2020

@neolit123 @PatrickLang @michmike

Finalizing documentation here kubernetes/website#19217

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 24, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benmoss

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 Feb 24, 2020
valueFrom:
fieldRef:
fieldPath: status.podIP
image: sigwindowstools/kube-proxy:1.17.3
Copy link
Member

@neolit123 neolit123 Feb 25, 2020

Choose a reason for hiding this comment

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

ideally we should not pin the kube proxy version.
is there a way for the user to customize this during the initial script execution - e.g. using search and replace (sed)?

(i think) kube-proxy has a skew of +1 / -1 releases compared to core kube, so if this version is not updated and someone tries to deploy e.g. 1.19 it might fail.
[3]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, I was not sure what to do about this problem. This manifest is not deployed/edited by a script at all, the user is doing a kubectl apply with this file directly. So we can document in the step where we direct the user to do this that they pick the version that matches their node/cluster. We can provide a sed command to do so, that's pretty straightforward.

Copy link
Member

Choose a reason for hiding this comment

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

ideally it should be propagated from $KubernetesVersion in PrepareNode, so when the user picks a version the PowerShell patches the YAMLs that later the user applies.

Copy link
Contributor Author

@benmoss benmoss Feb 25, 2020

Choose a reason for hiding this comment

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

The problem is that PrepareNode/InstallNssm are run on the Windows nodes, whereas kube-proxy.yml is run from your workstation where you have kubectl access.

Copy link
Member

@neolit123 neolit123 Feb 25, 2020

Choose a reason for hiding this comment

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

ok, i overlooked this. i guess it makes sense to document this and possibly give a sed example too. i don't think we want the users to apply the stock manifest without making sure it has the version they want.

@@ -0,0 +1,15 @@
ARG k8sVersion="1.17.3"
Copy link
Member

Choose a reason for hiding this comment

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

[3]

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah this is just the default, and so can be overridden with docker build --build-arg k8sVersion="1.18.0". We'll need to set up some automation to produce new images on new releases though.

Copy link
Member

Choose a reason for hiding this comment

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

i've been playing with GitHub actions in this regard so automation seems possible.

but it this goes back to the topic of whether we want to branch / tag this repository and or have the install scripts in folders.

i think this is always the safest bet, because otherwise if a single set of scripts and docker files is maintained for the whole support skew of k8s it might end up with some if version ... branches.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

What do you think of using github releases for the script and manifest artifacts? I don't want to create version subdirectories since they are going to be 99% identical to each other.

Copy link
Member

Choose a reason for hiding this comment

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

having releases / tags is fine, but without branches it will not allow backports.
one option is to start with a linear tag increments in a single branch (master), but if a change is required for a backport a branch can be created.

@neolit123
Copy link
Member

thanks for adding this @benmoss @gab-satchi
added some comments, mostly minor.

what is the plan for deprecating and removing the old code here?
https://github.com/kubernetes-sigs/sig-windows-tools/tree/master/kubeadm

Avoid using the Windows directory to store non-official binaries
Ben Moss added 2 commits February 25, 2020 11:46
wins for whatever reason validates the path both inside the container
and on the host, meaning the file has to exist and have the same
checksum inside as well as outside.
@benmoss
Copy link
Contributor Author

benmoss commented Feb 25, 2020

what is the plan for deprecating and removing the old code here?
https://github.com/kubernetes-sigs/sig-windows-tools/tree/master/kubeadm

Not sure, what do you think we should do? Delete it? Make some "archive" subdirectory or something?

@neolit123
Copy link
Member

Not sure, what do you think we should do? Delete it? Make some "archive" subdirectory or something?

given:

  • the feature state is currently alpha
  • the old code is stored in git

i think we can just delete the old code in a new PR.

@benmoss
Copy link
Contributor Author

benmoss commented Feb 26, 2020

I actually just realized that if we remove the old code it will break the old documentation. It links to things like https://github.com/kubernetes-sigs/sig-windows-tools/archive/master.zip that is just a zip of current master of the repo. Not sure if that is a concern or not.

@neolit123
Copy link
Member

I actually just realized that if we remove the old code it will break the old documentation. It links to things like https://github.com/kubernetes-sigs/sig-windows-tools/archive/master.zip that is just a zip of current master of the repo. Not sure if that is a concern or not.

i'd leave it to sig-windows to establish the level of concern for this issue.
given this is an alpha feature the concerns might not be too high.

k/website have a no-backport policy, but a backport for a old dev-1.x branch there might be needed here. using HEAD for documentation links is a bad idea and ideally the old docs should be updated to point to commit SHAs.

Docs will specify users need to substitute this with their k8s version,
this avoids people accidentally using the wrong version since now it
will break.
@neolit123
Copy link
Member

thanks for the updates.
this seems fine to me as much as i can read powershell.

/lgtm
/hold
feel free to cancel the hold.

@k8s-ci-robot k8s-ci-robot added do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. lgtm "Looks good to me", indicates that a PR is ready to be merged. labels Feb 26, 2020
@ksubrmnn
Copy link
Contributor

@JocelynBerrendonner

No reason to run two scripts when one will do
@k8s-ci-robot k8s-ci-robot removed the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 26, 2020
Ben Moss added 2 commits February 26, 2020 16:28
Apparently the official site has some stability issues
This seems to mess up cloudbase-init somehow, the stderr from curl
causes a "RemoteException"/"NativeCommandError"
mkdir -force C:\etc\kubernetes\pki
New-Item -path C:\var\lib\kubelet\etc\kubernetes\pki -type SymbolicLink -value C:\etc\kubernetes\pki\

$StartKubeletFileContent = '$FileContent = Get-Content -Path "/var/lib/kubelet/kubeadm-flags.env"
Copy link
Member

Choose a reason for hiding this comment

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

just pointing out that this PR will improve the kubelet flag management for kubeadm on Windows:
kubernetes/kubernetes#88287

@neolit123
Copy link
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Feb 27, 2020
@benmoss
Copy link
Contributor Author

benmoss commented Feb 27, 2020

/hold cancel
/honk

@k8s-ci-robot
Copy link
Contributor

@benmoss:
goose image

In response to this:

/hold cancel
/honk

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 removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 27, 2020
@k8s-ci-robot k8s-ci-robot merged commit 58ca85b into kubernetes-sigs:master Feb 27, 2020
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. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants