-
Notifications
You must be signed in to change notification settings - Fork 672
Update weave-kube docs and YAML files to leverage Launch Generator #2903
Conversation
819a1d0
to
e01f43e
Compare
Documentation changes:modified kube-addon |
e01f43e
to
bfd095d
Compare
labels: | ||
name: weave-net | ||
name: weave-net | ||
annotations: | ||
cloud.weave.works/launcher-info: |- |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
- name: weavedb | ||
mountPath: /weavedb | ||
emptyDir: {} |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
bfd095d
to
93f4450
Compare
labels: | ||
name: weave-net | ||
name: weave-net | ||
annotations: | ||
cloud.weave.works/launcher-info: |- |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
spec: | ||
template: | ||
metadata: | ||
kind: List |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
"email-address": "[email protected]" | ||
} | ||
apiVersion: v1 | ||
kind: ServiceAccount |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
name: weave-net | ||
namespace: kube-system | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
site/kube-addon.md
Outdated
``` | ||
|
||
After a few seconds, a Weave Net pod should be running on each | ||
Node and any further pods you create will be automatically attached to the Weave | ||
network. | ||
|
||
**Note:** In Kubernetes versions `1.6` and above, depending on how your cluster is configured, you may need to: |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
site/kube-addon.md
Outdated
- add `sudo`, | ||
- add `--kubeconfig /etc/kubernetes/admin.conf` (or equivalent), | ||
|
||
to the above `kubectl version` command. |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
53a179c
to
8180b0d
Compare
7642edc
to
4016409
Compare
One thought: on release, we need to update the git.io short URLs, but there is no way to synchronise that with the release. I guess it's ok if we update the static files first, then update the short URLs, and the docs are wrong about the mapping in the meantime. |
site/kube-addon.md
Outdated
@@ -62,6 +62,32 @@ Shut down Kubernetes, and _on all nodes_ perform the following: | |||
Then relaunch Kubernetes and install the addon as described | |||
above. | |||
|
|||
**Note:** You can customise the generated YAML file by passing Weave Net's options, arguments and environment variables as query parameters: |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
4016409
to
42e1757
Compare
If we proceed in the order described below, though, it should be OK?
Alternatively we could just keep the git.io short URLs pointing to the static files and remove "Note: URLs", but I did it this way because we apparently wanted to have all users leverage the LG. |
site/kube-addon.md
Outdated
``` | ||
$ kubectl apply -n kube-system -f "https://cloud.weave.works/k8s/net?k8s-version=$(kubectl version | base64 | tr -d '\n')&env.MTU=1337" | ||
``` | ||
This command -- notice `&env.MTU=1337` at the end of the URL -- generates a YAML file containing, among others: |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
42e1757
to
18992bf
Compare
site/kube-addon.md
Outdated
- name: IPALLOC_RANGE | ||
value: 10.0.0.0/16 | ||
``` | ||
- `version`: Weave Net's version. Default: latest release. |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Yes; I was just musing about the lack of synchronisation and the docs being wrong in the interim. |
18992bf
to
2598e86
Compare
cc @abuehrle if you want to review the docs changes |
N.B.: I'll fix the conflicts once weaveworks/launch-generator/issues/106 and weaveworks/launch-generator/issues/107 have been approved, and will simply re-generate the YAML files using the Launch Generator. |
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 had some changes around the YAML to download and edit based on the version of Net you have set.
site/kube-addon.md
Outdated
Historic versions are archived on our [GitHub release | ||
page](https://github.com/weaveworks/weave/releases). | ||
**Note:** URLs: | ||
|
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
site/kube-addon.md
Outdated
- [https://git.io/weave-kube-1.6](https://git.io/weave-kube-1.6) | ||
|
||
point respectively to: | ||
|
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
site/kube-addon.md
Outdated
- [https://cloud.weave.works/k8s/v1.6/net](https://cloud.weave.works/k8s/v1.6/net). | ||
|
||
In the past, these URLs were pointing to static YAML files for the [latest release](https://github.com/weaveworks/weave/releases/tag/latest_release) of the Weave Net addon, respectively: | ||
|
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
site/kube-addon.md
Outdated
|
||
Some parameters are changed by environment variables; these can be | ||
inserted into the YAML file like this: | ||
If you are getting your YAML file from `cloud.weave.works` as described above, then you can customise it by passing some of Weave Net's options, arguments and environment variables as query parameters: | ||
|
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
site/kube-addon.md
Outdated
value: 10.0.0.0/16 | ||
``` | ||
- `version`: Weave Net's version. Default: `latest`, i.e. latest release. *WARNING*: Backward compatibility of the YAML is not guaranteed. If you lock Weave Net's version using something else than `latest` for this query parameter, please make sure you do so with the latest release, save a copy of the YAML and use this copy instead of downloading it every time from `cloud.weave.works`. | ||
- `known-peers`: comma-separated list of hosts. Default: empty. |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
site/kube-addon.md
Outdated
#### Manually editing the YAML file | ||
|
||
Whether you saved the YAML file served at `cloud.weave.works` or downloaded a static YAML file from our [releases page](https://github.com/weaveworks/weave/releases), you can manually edit it to suit your needs. | ||
|
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
170ab1c
to
c4ba7de
Compare
securityContext: | ||
privileged: true | ||
volumeMounts: | ||
seLinuxOptions: |
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
This comment was marked as abuse.
This comment was marked as abuse.
Sorry, something went wrong.
Details: - Update weave-kube docs to avoid explicit versioning by leveraging the Launch Generator. - Update weave-kube docs to mention YAML customisation via the Launch Generator. - Warn about potential backward incompatibility of the generated YAML, and how to ensure YAML and Net versions are compatible.
Note that given the YAML's structure is different from previous version, indentation of `COVERAGE_ARGS` had to change (+4 whitespaces to each line). Commands used: ``` $ curl -fsS https://frontend.dev.weave.works/k8s/v1.5/net?v=latest > prog/weave-kube/weave-daemonset.yaml $ curl -fsS https://frontend.dev.weave.works/k8s/v1.6/net?v=latest > prog/weave-kube/weave-daemonset-k8s-1.6.yaml ``` Annotations removed from Launch Generator's files: ``` annotations: cloud.weave.works/launcher-info: |- { "server-version": "master-050965d", "original-request": { "url": "/k8s/v1.6/net?v=latest", "date": "Thu May 25 2017 13:16:43 GMT+0000 (UTC)" }, "email-address": "[email protected]" } ``` and ``` annotations: cloud.weave.works/launcher-info: |- { "server-version": "master-050965d", "original-request": { "url": "/k8s/v1.5/net?v=latest", "date": "Thu May 25 2017 13:16:43 GMT+0000 (UTC)" }, "email-address": "[email protected]" } ```
c4ba7de
to
067ce6d
Compare
YAML for Kubernetes 1.5 seems to work fine:
|
Context:
The current Kubernetes YAML for
weave-kube
v1.5
, and one forv1.6
and above, which forces users to make choices about how they installweave-kube
, hence increasing mental burden.The latest version of the Launch Generator supports, among others:
kubectl version
to automatically extract Kubernetes' "server version" and return appropriate YAML configuration (weaveworks/launch-generator#79) without having users to care about it, which addresses 2. above.Changelog:
Related work:
This PR and the above ones:
cc: @errordeveloper