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

readme: lots more documentation #50

Merged
merged 1 commit into from
Jan 8, 2019
Merged

readme: lots more documentation #50

merged 1 commit into from
Jan 8, 2019

Conversation

squeed
Copy link
Contributor

@squeed squeed commented Dec 17, 2018

No description provided.

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Dec 17, 2018
@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 17, 2018
README.md Outdated
@@ -1,52 +1,202 @@
# Cluster Network Operator

This is an operator that manages the networking components for an openshift cluster.
The Cluster Network Operator installs and upgrades the networking components on a Kubernetes cluster.
Copy link
Contributor

Choose a reason for hiding this comment

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

Given that we only plan to support the network plugins that OCP supports, I think "an OpenShift cluster" is more correct than "a Kubernetes cluster"? Or maybe just explicitly explain that it can run on plain k8s but only supports a subset of plugins and configuration options.

README.md Outdated

## Building
When the controller has reconciled and all its dependent resources have converged, the cluster should have an installed SDN plugin and a working service network. It normally runs very early in the install process - before the permanent API server has been started.
Copy link
Contributor

Choose a reason for hiding this comment

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

"permanent API server" is assuming OpenShift again.

Maybe something like "In OpenShift, the Cluster Network Operator runs very early in the install process, to set up the pod network and service proxying before starting the aggregated apiserver." (AIUI the main k8s apiserver is started hostNetwork before CNO, and keeps running afterward, and it's only the OpenShift apiserver that runs on the pod network? Or maybe that changed at some point, or maybe I misunderstood...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is a better way of wording it. FYI, the network operator does run using the bootstrap api server (the apiserver running on the bootstrap node). The switch over to the real apiserver happens afterwards, even though the apiserver is host network.

README.md Outdated
```

## Running
## Configuring IP address pools
Users must supply at least two address pools - one for pods, and one for services. This is the ClusterNetworks and ServiceNetwork parameter. Some network plugins, such as OpenShiftSDN, support multiple ClusterNetworks.
Copy link
Contributor

Choose a reason for hiding this comment

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

"These are" not "This is"

README.md Outdated Show resolved Hide resolved

It follows the [Controller pattern](https://godoc.org/github.com/kubernetes-sigs/controller-runtime/pkg#hdr-Controller): it reconciles the state of the cluster against a desired configuration. The configuration specified by a CustomResourceDefinition called `networkoperator.openshift.io/NetworkConfig/v1`, which has a corresponding [type](/openshift/cluster-network-operator/blob/master/pkg/apis/networkoperator/v1/networkconfig_types.go).
Copy link
Contributor

Choose a reason for hiding this comment

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

so this is all going to change post-openshift/api#141 right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Somewhat, yes.

README.md Outdated Show resolved Hide resolved
README.md Outdated

* `iptablesSyncPeriod`: The interval between periodic iptables refreshes. Default: 30 seconds
* `bindAddress`: The address to "bind" to - the address for which traffic will be redirected
* `proxyArguments`: additional command-line flags to pass to kube-proxy - see
Copy link
Contributor

Choose a reason for hiding this comment

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

missing something at the end

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Bah, we don't actually have a list of all of the possible iptables configuration flags. The only existing one is upstream: https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/

Copy link
Contributor

Choose a reason for hiding this comment

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

Referencing upstream docs is fine, I think

README.md Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@squeed
Copy link
Contributor Author

squeed commented Dec 18, 2018

@danwinship thanks a ton for the thorough review.

Copy link
Contributor

@pecameron pecameron left a comment

Choose a reason for hiding this comment

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

Yea Docs! Thanks for writing this. I have a bunch of comments spread around. Two main points: the high level discussion should also motivate the choices. A lot of getting the cluster networking is done once when it is first set up. We need to let people know the ramifications of their choices. Second, we need to articulate valid ranges and any special cases for each option and how the choices impact operations.

We have tuning knobs and we need to discuss how to use them and what to expect as they are adjusted.

Maybe we should eliminate defaults and force the user to fill in all parameters.

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Outdated

You can build an image using podman with
# Configuring
The network operator has a complex configuration, but most parameters have a sensible default.
Copy link
Contributor

Choose a reason for hiding this comment

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

The following does not appear all that complex...

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
@squeed
Copy link
Contributor Author

squeed commented Jan 5, 2019

@pecameron @danwinship thanks for the thorough review. Updated, PTAL.

Copy link
Contributor

@danwinship danwinship left a comment

Choose a reason for hiding this comment

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

two comments, but they can be fixed later since we're going to need followups anyway for multus, operatorstatus, api 141, etc

Currently, the only supported value for network Type is `OpenShiftSDN`.

### Configuring OpenShiftSDN
OpenShiftSDN supports the following configuration options, all of which are optional:
Copy link
Contributor

Choose a reason for hiding this comment

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

should clarify that these are under defaultNetwork.openshiftSDNConfig


* `iptablesSyncPeriod`: The interval between periodic iptables refreshes. Default: 30 seconds. Increasing this can reduce the number of iptables invocations.
* `bindAddress`: The address to "bind" to - the address for which traffic will be redirected.
* `proxyArguments`: additional command-line flags to pass to kube-proxy - see the [documentation](https://kubernetes.io/docs/reference/command-line-tools-reference/kube-proxy/).
Copy link
Contributor

Choose a reason for hiding this comment

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

should clarify how this works; proxyArguments is a map[string][]string, so the value has to be specified as an array, even though most arguments only accept a single value. (This might make more sense as a footnote to the example below.)

@danwinship
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 8, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: danwinship, squeed

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

@openshift-merge-robot openshift-merge-robot merged commit 39b92cb into openshift:master Jan 8, 2019
@squeed squeed deleted the readme branch March 6, 2019 11:13
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. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants