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

Update deployment steps to use the new Helm chart #9

Merged
merged 16 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 33 additions & 13 deletions docs/port-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,38 +7,58 @@ accustomed to, the sidecar cluster exposes multiple ports.
You can restrict or increase the set of exposed ports by changing
the exposed ports in the `values.yaml` file.

## Changing a single repository exposed ports
## Declaring container ports

On the `values.yaml` file, you can disable a specific repository, which will make its
defined ports not get exposed in the main service. For example, by default,
the `mysql` section of the `values.yaml` file contains this definition:
On the `values.yaml` file, you can find different parameters related
to ports exposure. The `containerPorts` object specifies which ports
the container will listen on. It has a map of `<port-name>: <port-number>`,
where `<port-name>` is an arbitrary name for the port and `<port-number>`
is an integer to the TCP port. These are the same port numbers used to bind
data repositories on the Control Plane.

```yaml
containerPorts:
mysql: 3306
pg: 5432
mongodb0: 27017
mongodb1: 27018
mongodb2: 27019
```

This means that the ports `3306` and `5432` will be exposed in the
sidecar service. To increase or decrease the ports exposed, you can
add or remove ports from the `containerPorts` section of the `values.yaml` file.
The above example declares some port names (`mysql`, `pg`, `mongodb0`, `mongodb1`,
and `mongodb2`) and their corresponding port numbers. We can refer to these port
names later on to expose them through a Kubernetes service.

## Overriding all exposed ports
## Exposing container ports

If you only need to expose a few ports and don't want to go through the trouble of
changing all repository ports, you can use the `service.ports` section of the
`values.yaml` file, which will make the chart ignore repo-specific port definitions
and only expose the ports defined in that section.
To expose container ports to external traffic or to other pods within the cluster, you need to set
service ports. The `service` object defines `ports` and `targetPorts`. The `ports` property specifies
the ports the Service will expose, while `targetPort` maps the Service ports to the container's
`containerPorts` declared previously.

In `service.ports`, you define a map of `<port-name>: <port-number>` where the Kubernetes service
will listen on. Then, you can use `service.targetPorts` to map service ports to container ports
in the format `<service-port-name>: <container-port-name>`. For instance, assuming you defined a
container port as `mysql: 3306` and a service port as `mysql: 3306`, you can set `mysql: mysql`
in `targetPorts` to create a link between them.

Following is an example of how to set service ports.

```yaml
service:
...
ports:
mysql: 3306
pg: 5432
mongodb0: 27017
mongodb1: 27018
mongodb2: 27019
targetPort:
mysql: mysql
pg: pg
mongodb0: mongodb0
mongodb1: mongodb1
mongodb2: mongodb2
```

The above example makes no port but `3306` and `5432` be exposed on the service.
The above example expose ports `3306`, `5432`, `27017`, `27018`, and `27019` on the service.
7 changes: 4 additions & 3 deletions docs/resources.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ to your `values.yaml` file.
```yaml
resources:
limits:
cpu: 400m
cpu: 2
memory: 8096Mi
requests:
cpu: 100m
cpu: 1
memory: 4096Mi
```

**NOTE:** The above are the recommended settings for the sidecar.
**NOTE:** The above are the recommended settings for the sidecar. We recommend that
you adjust the limits based on your workload and the available resources.