Skip to content

Commit

Permalink
Whitespace cleanup
Browse files Browse the repository at this point in the history
Signed-off-by: Lori Jakab <lojakab@cisco.com>
  • Loading branch information
ljakab committed Mar 24, 2021
1 parent ed9efbe commit cbb01d1
Show file tree
Hide file tree
Showing 9 changed files with 39 additions and 90 deletions.
76 changes: 19 additions & 57 deletions code-of-conduct.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,29 @@
# Contributing

Thank you for your interest in contributing to CN-WAN Operator.
Please make sure you read the full code of conduct before making any
contribution.
Thank you for your interest in contributing to CN-WAN Operator. Please make sure you read the full code of conduct before making any contribution.

Before contributing to this repository, please first create an issue discussing
the change you wish to make or discuss about it via email with one of the
owners of the project.
Before contributing to this repository, please first create an issue discussing the change you wish to make or discuss about it via email with one of the owners of the project.

We kindly ask you to follow the following code of conduct in all your
interactions with the project.
We kindly ask you to follow the following code of conduct in all your interactions with the project.

## Pull Request Process

1. Ensure any install or build dependencies are removed before asking to merge
your code.
2. Update the README.md with details of changes to the interface, including new
environment variables, exposed ports, file locations and container parameters.
3. Increase the version numbers in any examples files and the README.md to the
new version that this Pull Request would represent. The versioning scheme we
use is [SemVer](http://semver.org/).
4. You may ask one (or more) of the code owners to review and merge your Pull
Request.
1. Ensure any install or build dependencies are removed before asking to merge your code.
2. Update the README.md with details of changes to the interface, including new environment variables, exposed ports, file locations and container parameters.
3. Increase the version numbers in any examples files and the README.md to the new version that this Pull Request would represent. The versioning scheme we use is [SemVer](http://semver.org/).
4. You may ask one (or more) of the code owners to review and merge your Pull Request.

## Code of Conduct

All participants of CN-WAN Operator are expected to abide by our Code of Conduct,
both online and during in-person events that are hosted and/or associated
with CN-WAN Operator.
All participants of CN-WAN Operator are expected to abide by our Code of Conduct, both online and during in-person events that are hosted and/or associated with CN-WAN Operator.

### Our Pledge

In the interest of fostering an open and welcoming environment, we pledge
to make participation in our project and our community a harassment-free
experience for everyone, regardless of age, body size, disability, ethnicity,
gender identity and expression, level of experience, nationality, personal
appearance, race, religion, or sexual identity and orientation.
In the interest of fostering an open and welcoming environment, we pledge to make participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

### The Standards

Examples of behaviour that contributes to creating a positive environment
include:
Examples of behaviour that contributes to creating a positive environment include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
Expand All @@ -51,47 +34,26 @@ include:
Examples of unacceptable behavior by participants include:

* Trolling, insulting/derogatory comments, public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Not being respectful to reasonable communication boundaries, such as
'leave me alone', 'go away', or 'I’m not discussing this with you'.
* The usage of sexualised language or imagery and unwelcome sexual attention
or advances
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Not being respectful to reasonable communication boundaries, such as 'leave me alone', 'go away', or 'I’m not discussing this with you'.
* The usage of sexualised language or imagery and unwelcome sexual attention or advances
* Swearing, usage of strong or disturbing language
* Demonstrating the graphics or any other content you know may be considered
disturbing
* Demonstrating the graphics or any other content you know may be considered disturbing
* Starting and/or participating in arguments related to politics
* Assuming or promoting any kind of inequality including but not limited to:
age, body size, disability, ethnicity, gender identity and expression,
nationality and race, personal appearance, religion, or sexual identity and
orientation
* Assuming or promoting any kind of inequality including but not limited to: age, body size, disability, ethnicity, gender identity and expression, nationality and race, personal appearance, religion, or sexual identity and orientation
* Drug promotion of any kind
* Attacking personal tastes
* Other conduct which you know could reasonably be considered inappropriate in
a professional setting.
* Other conduct which you know could reasonably be considered inappropriate in a professional setting.

## Enforcement

Violations of the Code of Conduct may be reported by sending an email to one
of the owners or maintainers of the project, as listed in OWNERS.
All reports will be reviewed and investigated and will result in a response
that is deemed necessary and appropriate to the circumstances. Further details
of specific enforcement policies may be posted separately.
Violations of the Code of Conduct may be reported by sending an email to one of the owners or maintainers of the project, as listed in OWNERS. All reports will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Further details of specific enforcement policies may be posted separately.

We hold the right and responsibility to remove comments or other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any members for other behaviours that they deem inappropriate,
threatening, offensive, or harmful.
We hold the right and responsibility to remove comments or other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any members for other behaviours that they deem inappropriate, threatening, offensive, or harmful.

### Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an
appointed representative at an online or offline event.
Representation of a project may be further defined and clarified by project
maintainers.
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

### Attribution

Expand Down
6 changes: 3 additions & 3 deletions docs/advanced_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ Before deploying the operator you will need to configure it.
### Settings
Modify the file `config/manager/settings.yaml` with the appropriate values.
You will need to modify what's below `settings.yaml: |` and follow [Configuration](./configuration.md) if you haven't already.
Modify the file `config/manager/settings.yaml` with the appropriate values. You will need to modify what's below `settings.yaml: |` and follow [Configuration](./configuration.md) if you haven't already.
### Credentials
Skip this step if you are not using Google Service Directory.
*Skip this step if you are not using Google Service Directory.*
Copy the contents of you Service Account and paste to `config/manager/serviceHandlerSecret.yaml` below `gcloud-credentials.json: |-`.
The file must look like this:
Expand Down
3 changes: 1 addition & 2 deletions docs/basic_installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ Before deploying the operator you will need to configure it.

### Settings

Modify the file `deploy/settings/settings.yaml` with the appropriate values.
If you haven't already, please read [Configuration](./configuration.md) to learn how to do this.
Modify the file `deploy/settings/settings.yaml` with the appropriate values. If you haven't already, please read [Configuration](./configuration.md) to learn how to do this.
## Deploy
Expand Down
12 changes: 4 additions & 8 deletions docs/etcd/concepts.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ If you are already using etcd for your own purposes or are exploring on doing so

## Service registry objects

The CN-WAN Operator will store *Namespace*s, *Service*s and *Endpoint*s on etcd.
Please take a look at the [general service registry documentation](../service_registry.md) to learn more about them.
The CN-WAN Operator will store *Namespace*s, *Service*s and *Endpoint*s on etcd. Please take a look at the [general service registry documentation](../service_registry.md) to learn more about them.

## Usage with CN-WAN Operator

Expand Down Expand Up @@ -63,15 +62,13 @@ As you can see from the examples above, there is a clear hierarchy structure whe

## Prefix

A *prefix* is just a regular key in etcd. If you want to insert new objects and they all fall under the same object type, i.e. `/environments`, you can use that as a prefix -- or, *base path*.
This will allow you to have a nice separation or scope for your objects and will prevent you from writing typos or long keys. For example, with respect to the previous section:
A *prefix* is just a regular key in etcd. If you want to insert new objects and they all fall under the same object type, i.e. `/environments`, you can use that as a prefix -- or, *base path*. This will allow you to have a nice separation or scope for your objects and will prevent you from writing typos or long keys. For example, with respect to the previous section:

* if you are inserting application objects, you may want to specify `/environments/testing/applications` as prefix
* if you are inserting rbac roles: `/authentication/rbac/roles`
* if you are inserting service registry objects: `/service-registry`

Focusing on this last example, the CN-WAN Operator will put all objects under `/service-registry` if you don't provide another one.
As we said, the prefix is just a regular key and therefore can have a value, though CN-WAN Operator will neither create it nor put values in there, but you are free to do that if you want: i.e. you can put the name of the team that is in charge of managing your *Kubernetes* cluster just to make a very simple example.
Focusing on this last example, the CN-WAN Operator will put all objects under `/service-registry` if you don't provide another one. As we said, the prefix is just a regular key and therefore can have a value, though CN-WAN Operator will neither create it nor put values in there, but you are free to do that if you want: i.e. you can put the name of the team that is in charge of managing your *Kubernetes* cluster just to make a very simple example.

If you pass an empty string as prefix to the CN-WAN Operator or just pass `/`, then objects will only have `/` as base path. Be careful with what you set as prefix as this may potentially overwrite existing data.

Expand All @@ -96,7 +93,6 @@ service-registry | /service-registry

On top level we have our prefix, or base path: `/service-registry`. Once again, the CN-WAN Operator will not actually create this key and value, and you can specify whatever you want here: in the graph above it is included only to make the hierarchy more evident.

After that, you can see that each object "inherits" the full key of its parent object and includes its object type in plural form.
This will make it organized and prevent overrides when two objects have the same name but different object type.
After that, you can see that each object "inherits" the full key of its parent object and includes its object type in plural form. This will make it organized and prevent overrides when two objects have the same name but different object type.

Notice how the service `payroll` is contained in both `production` and `testing`: the key format on the right leaves no room for confusion nor overrides.
8 changes: 4 additions & 4 deletions docs/etcd/demo_cluster_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ This guide will help you set up an example etcd cluster that you can use with CN

In the first part, *Create the etcd cluster*, we will install and start etcd. The second part, *Make it more secure*, is not mandatory but **highly** suggested.

**IMPORTANT NOTE**: this guide will only help you create a **demo** cluster so that you can quickly have a working example to use with the CN-WAN Operator and is not intended to be used in production.
We strongly encourage you to follow more thorough guides if you want to use etcd in production.
**IMPORTANT NOTE**: this guide will only help you create a **demo** cluster so that you can quickly have a working example to use with the CN-WAN Operator and is not intended to be used in production. We strongly encourage you to follow more thorough guides if you want to use etcd in production.

## Create the etcd cluster

Expand Down Expand Up @@ -71,6 +70,7 @@ Before going any further, we once again remind you that this is a **demo** clust
### Start etcd *with* docker

Skip this part if you installed etcd *without* Docker.

Start etcd as:

```bash
Expand Down Expand Up @@ -192,7 +192,7 @@ etcdctl get /
and `Error: etcdserver: user name is empty` should appear. Now try to do the same operation as the root user:

```bash
etcdctl --user root:<password> get /
etcdctl --user root:<password> get /
```

and... nothing appears. Well, this is correct: your cluster doesn't contain any data yet, so nothing is found.
Expand Down Expand Up @@ -247,7 +247,7 @@ Now, try to perform one of the following operations as the `cnwan-operator` user
```bash
# Get resource / as the cnwan-operator user
etcdctl --user cnwan-operator:<password> \
get /
get /

# Get the list of users as cnwan-operator user
etcdctl --user cnwan-operator:<password> \
Expand Down
12 changes: 4 additions & 8 deletions docs/etcd/interact.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ Now, try to do
etcdctl get /service-registry --prefix
```

And you should see an empty response because the service registry is currently empty.
`--prefix` tells etcd to get all objects that a key *starting* with the provided key.
And you should see an empty response because the service registry is currently empty. `--prefix` tells etcd to get all objects that a key *starting* with the provided key.

### Create a namespace

Expand All @@ -48,8 +47,7 @@ metadata:
Now, since this is a *namespace*, its key will be `/namespaces/production`.

Remember though that we want prefix `/service-registry` to be there for all service registry objects: therefore its full key will be `/service-registry/namespaces/production`.
If you haven't already, please read the [Service registry keys section](./concepts.md#service-registry-keys) for more information.
Remember though that we want prefix `/service-registry` to be there for all service registry objects: therefore its full key will be `/service-registry/namespaces/production`. If you haven't already, please read the [service registry keys section](./concepts.md#service-registry-keys) for more information.

Now, let's insert it on etcd:

Expand Down Expand Up @@ -202,8 +200,7 @@ On the new terminal, execute the following command, which will *watch* for chang
etcdctl watch /service-registry/ --prefix
```

Now, leave that window there and switch to the previous one again.
You just realized that the *training* service cointains video training session: `standard` is probably not a good *traffic profile* choice there. Let's change it to `video`:
Now, leave that window there and switch to the previous one again. You just realized that the *training* service contains video training session: `standard` is probably not a good *traffic profile* choice there. Let's change it to `video`:

```bash
cat << EOF | etcdctl put /service-registry/namespaces/production/services/training
Expand All @@ -221,5 +218,4 @@ Press enter and the other window will show you the `/service-registry/namespaces

## Next steps

Congratulations: you just performed tasks that the CN-WAN Operator and [Reader](https://github.com/CloudNativeSDWAN/cnwan-reader) perform automatically for you.
So why don't you take a step further and [set up the CN-WAN Operator](./operator_configuration.md) to do this for you? We'll see you there :)
Congratulations: you just performed tasks that the CN-WAN Operator and [Reader](https://github.com/CloudNativeSDWAN/cnwan-reader) perform automatically for you. So why don't you take a step further and [set up the CN-WAN Operator](./operator_configuration.md) to do this for you? We'll see you there :)
6 changes: 2 additions & 4 deletions docs/etcd/operator_configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,13 @@ serviceRegistry:
port: <port-2>
```

`namespace` and `service` settings are covered in the [main documentation](../configuration.md).
Let's now only focus on `serviceRegistry` options.
`namespace` and `service` settings are covered in the [main documentation](../configuration.md). Let's now only focus on `serviceRegistry` options.

## etcd settings

### Prefix

Set the `prefix` to whatever value you want/need and all object keys will start with it.
In case you omit or leave it empty the CN-WAN Operator will use `/service-registry` as a default prefix. If you don't want any prefix just write `/`.
Set the `prefix` to whatever value you want/need and all object keys will start with it. In case you omit or leave it empty the CN-WAN Operator will use `/service-registry` as a default prefix. If you don't want any prefix just write `/`.

If you haven't already, please read our [etcd concepts documentation](./concepts.md) to learn more about keys and prefixes.

Expand Down
3 changes: 1 addition & 2 deletions docs/gcp_service_directory/configure_with_operator.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ serviceRegistry:
projectID: <project>
```

`namespace` and `service` settings are covered in the [main documentation](../configuration.md).
Let's now only focus on `serviceRegistry` options.
`namespace` and `service` settings are covered in the [main documentation](../configuration.md). Let's now only focus on `serviceRegistry` options.

## Service Directory settings

Expand Down
3 changes: 1 addition & 2 deletions docs/service_registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ As we said on the main documentation, the CN-WAN Operator currently supports *Go

## Objects

Let's now cover the objects that the CN-WAN Operator will work with. Keep in mind that some products, i.e. Google Service Directory, may work with objects that have the same names but different formats. Nonetheless, the CN-WAN Operator will provide you with data that always look like the ones included in this guide.
Even more, some service registries may not even provide some of those objects: in case you want to use those, the CN-WAN Operator will try to abstract them as best as it can while still using the service registry's own format.
Let's now cover the objects that the CN-WAN Operator will work with. Keep in mind that some products, i.e. Google Service Directory, may work with objects that have the same names but different formats. Nonetheless, the CN-WAN Operator will provide you with data that always look like the ones included in this guide. Even more, some service registries may not even provide some of those objects: in case you want to use those, the CN-WAN Operator will try to abstract them as best as it can while still using the service registry's own format.

We will give examples in a *YAML* format since it is the one that CN-WAN adopts as default, along with a formal description of the objects with their types so that - as long as you respect field names, hierarchies and types - you can marshal and unmarshal them in your application as well.

Expand Down

0 comments on commit cbb01d1

Please sign in to comment.