Skip to content

Commit

Permalink
Merge branch 'main' into add-scalardb-analytics-postgresql-chart
Browse files Browse the repository at this point in the history
  • Loading branch information
kota2and3kan committed Nov 13, 2023
2 parents e7800eb + 683ee4c commit a79142f
Show file tree
Hide file tree
Showing 15 changed files with 275 additions and 263 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/helm_charts_scalar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,17 @@ jobs:
- name: Set up chart-testing
uses: helm/chart-testing-action@v2
with:
version: 3.10.1

- name: Run chart-testing (lint)
- name: Run chart-testing (updated chart)
if: ${{ github.event_name != 'workflow_dispatch' }}
run: ct lint --config .github/ct.yaml

- name: Run chart-testing (all charts)
if: ${{ github.event_name == 'workflow_dispatch' }}
run: ct lint --config .github/ct-all.yaml

kubeaudit-chart:
runs-on: ubuntu-latest
env:
Expand Down
111 changes: 57 additions & 54 deletions docs/configure-custom-values-envoy.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This document explains how to create your custom values file for the Scalar Envo

## Configure custom values for Scalar Envoy chart

The Scalar Envoy chart is used via other charts (scalardb, scalardl, and scalardl-audit). So, you don't need to create a custom values file for the Scalar Envoy chart. If you want to configure Scalar Envoy, you need to add configuration `envoy.*` to other charts.
The Scalar Envoy chart is used via other charts (scalardb, scalardb-cluster, scalardl, and scalardl-audit), so you don't need to create a custom values file for the Scalar Envoy chart. If you want to configure Scalar Envoy, you need to add the `envoy.*` configuration to the other charts.

For example, if you want to configure the Scalar Envoy for ScalarDB Server, you can configure some Scalar Envoy configurations in the custom values file of ScalarDB as follows.

Expand All @@ -21,25 +21,19 @@ For example, if you want to configure the Scalar Envoy for ScalarDB Server, you
## Required configurations
### Image configurations
### Service configurations
You must set `envoy.service.type` to specify the Service resource type of Kubernetes.

You must set `envoy.image.repository` and `envoy.image.version`. Please specify the container repository information that you pull the Scalar Envoy container image.
If you accept client requests from inside of the Kubernetes cluster only (for example, if you deploy your client applications on the same Kubernetes cluster as Scalar products), you can set `envoy.service.type` to `ClusterIP`. This configuration doesn't create any load balancers provided by cloud service providers.

```yaml
envoy:
image:
repository: <Container image of Scalar Envoy>
version: <Tag of image>
service:
type: ClusterIP
```

If you use AWS/Azure Marketplace, please refer to the following documents for more details.

* [How to install Scalar products through AWS Marketplace](https://github.com/scalar-labs/scalar-kubernetes/blob/master/docs/AwsMarketplaceGuide.md)
* [How to install Scalar products through Azure Marketplace](https://github.com/scalar-labs/scalar-kubernetes/blob/master/docs/AzureMarketplaceGuide.md)

### Service configurations

You must set `envoy.service.type` to specify the Service resource type of Kubernetes. If you want to use a load balancer provided by could providers, you need to set `envoy.service.type` to `LoadBalancer`.
If you want to use a load balancer provided by a cloud service provider to accept client requests from outside of the Kubernetes cluster, you need to set `envoy.service.type` to `LoadBalancer`.

```yaml
envoy:
Expand Down Expand Up @@ -70,11 +64,11 @@ You can configure them using the same syntax as the requests and limits of Kuber
envoy:
resources:
requests:
cpu: 200m
memory: 256Mi
cpu: 1000m
memory: 2Gi
limits:
cpu: 300m
memory: 328Mi
cpu: 2000m
memory: 4Gi
```

### Affinity configurations (Recommended in the production environment)
Expand All @@ -86,45 +80,24 @@ You can configure them using the same syntax as the affinity of Kubernetes. So,
```yaml
envoy:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: scalar-labs.com/dedicated-node
operator: In
values:
- scalardb
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- scalardb
- key: app.kubernetes.io/app
operator: In
values:
- envoy
topologyKey: kubernetes.io/hostname
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- scalardb-cluster
- key: app.kubernetes.io/app
operator: In
values:
- envoy
topologyKey: kubernetes.io/hostname
weight: 50
```

### Taints/Tolerations configurations (Recommended in the production environment)

If you want to control pod deployment using the taints and tolerations of Kubernetes, you can use `envoy.tolerations`.

You can configure them using the same syntax as the tolerations of Kubernetes. So, please refer to the official document [Taints and Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for more details on the tolerations configuration of Kubernetes.

```yaml
envoy:
tolerations:
- effect: NoSchedule
key: scalar-labs.com/dedicated-node
operator: Equal
value: scalardb
```

### Prometheus/Grafana configurations (Recommended in the production environment)
### Prometheus and Grafana configurations (Recommended in production environments)

If you want to monitor Scalar Envoy pods using [kube-prometheus-stack](https://github.com/prometheus-community/helm-charts/tree/main/charts/kube-prometheus-stack), you can deploy a ConfigMap, a ServiceMonitor, and a PrometheusRule resource for kube-prometheus-stack using `envoy.grafanaDashboard.enabled`, `envoy.serviceMonitor.enabled`, and `envoy.prometheusRule.enabled`.

Expand Down Expand Up @@ -161,6 +134,21 @@ envoy:
allowPrivilegeEscalation: false
```

### Image configurations (Default value is recommended)

If you want to change the image repository and version, you can use `envoy.image.repository` to specify the container repository information of the Scalar Envoy container image that you want to pull.

```yaml
envoy:
image:
repository: <SCALAR_ENVOY_CONTAINER_IMAGE>
```

If you're using AWS or Azure, please refer to the following documents for more details:

* [How to install Scalar products through AWS Marketplace](https://github.com/scalar-labs/scalar-kubernetes/blob/master/docs/AwsMarketplaceGuide.md)
* [How to install Scalar products through Azure Marketplace](https://github.com/scalar-labs/scalar-kubernetes/blob/master/docs/AzureMarketplaceGuide.md)

### Replica configurations (Optional based on your environment)

You can specify the number of replicas (pods) of Scalar Envoy using `envoy.replicaCount`.
Expand All @@ -169,3 +157,18 @@ You can specify the number of replicas (pods) of Scalar Envoy using `envoy.repli
envoy:
replicaCount: 3
```

### Taint and toleration configurations (Optional based on your environment)

If you want to control pod deployment by using the taints and tolerations in Kubernetes, you can use `envoy.tolerations`.

You can configure taints and tolerations by using the same syntax as the tolerations in Kubernetes. For details on configuring tolerations in Kubernetes, see the official Kubernetes documentation [Taints and Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/).

```yaml
envoy:
tolerations:
- effect: NoSchedule
key: scalar-labs.com/dedicated-node
operator: Equal
value: scalardb
```
4 changes: 2 additions & 2 deletions docs/configure-custom-values-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

When you deploy Scalar products using Scalar Helm Charts, you must prepare your custom values file based on your environment. Please refer to the following documents for more details on how to a create custom values file for each product.

* [ScalarDB Server](./configure-custom-values-scalardb.md)
* [ScalarDB GraphQL](./configure-custom-values-scalardb-graphql.md)
* [ScalarDB Cluster](./configure-custom-values-scalardb-cluster.md)
* [ScalarDL Ledger](./configure-custom-values-scalardl-ledger.md)
* [ScalarDL Auditor](./configure-custom-values-scalardl-auditor.md)
* [ScalarDL Schema Loader](./configure-custom-values-scalardl-schema-loader.md)
* [Scalar Manager](./configure-custom-values-scalar-manager.md)
* [Envoy](./configure-custom-values-envoy.md)
* [[Deprecated] ScalarDB Server](./configure-custom-values-scalardb.md)
* [[Deprecated] ScalarDB GraphQL](./configure-custom-values-scalardb-graphql.md)
5 changes: 2 additions & 3 deletions docs/configure-custom-values-scalar-manager.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ service:
### Image configurations
You must set `image.repository` and `image.tag`. Please specify the container repository information that you pull the Scalar Manager container image.
You must set `image.repository`. Be sure to specify the Scalar Manager container image so that you can pull the image from the container repository.

```yaml
image:
repository: <Container image of Scalar Manager>
tag: <Tag of image>
repository: <SCALAR_MANAGER_IMAGE>
```

### Targets configurations
Expand Down
68 changes: 30 additions & 38 deletions docs/configure-custom-values-scalardb-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ This document explains how to create your custom values file for the ScalarDB Cl

### Image configurations

You must set `scalardbCluster.image.repository` and `scalardbCluster.image.tag`. Please specify the container repository information that you will pull the ScalarDB Cluster container image from.
You must set `scalardbCluster.image.repository`. Be sure to specify the ScalarDB Cluster container image so that you can pull the image from the container repository.

```yaml
scalardbCluster:
image:
repository: <SCALARDB_CLUSTER_CONTAINER_IMAGE>
tag: <IMAGE_TAG>
```
### Database configurations
Expand Down Expand Up @@ -83,43 +82,21 @@ You can configure affinity and anti-affinity by using the same syntax for affini

```yaml
scalardbCluster:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: scalar-labs.com/dedicated-node
operator: In
values:
- scalardb-cluster
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- scalardb-cluster
- key: app.kubernetes.io/app
operator: In
values:
- scalardb-cluster
topologyKey: kubernetes.io/hostname
```

### Taints and tolerations configurations (recommended in production environments)

To control pod deployment by using taints and tolerations in Kubernetes, you can use `scalardbCluster.tolerations`.

You can configure taints and tolerations by using the same syntax as taints and tolerations in Kubernetes. For more details on the taints and tolerations configuration in Kubernetes, see [Taints and Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/).

```yaml
scalardbCluster:
tolerations:
- effect: NoSchedule
key: scalar-labs.com/dedicated-node
operator: Equal
value: scalardb-cluster
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- scalardb-cluster
- key: app.kubernetes.io/app
operator: In
values:
- scalardb-cluster
topologyKey: kubernetes.io/hostname
weight: 50
```

### Prometheus and Grafana configurations (recommended in production environments)
Expand Down Expand Up @@ -228,3 +205,18 @@ scalardbCluster:
configurationsForScalarDbCluster:
...
```

### Taint and toleration configurations (optional based on your environment)

If you want to control pod deployment by using the taints and tolerations in Kubernetes, you can use `scalardbCluster.tolerations`.

You can configure taints and tolerations by using the same syntax as the tolerations in Kubernetes. For details on configuring tolerations in Kubernetes, see the official Kubernetes documentation [Taints and Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/).

```yaml
scalardbCluster:
tolerations:
- effect: NoSchedule
key: scalar-labs.com/dedicated-node
operator: Equal
value: scalardb-cluster
```
71 changes: 36 additions & 35 deletions docs/configure-custom-values-scalardb-graphql.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# Configure a custom values file for ScalarDB GraphQL
# [Deprecated] Configure a custom values file for ScalarDB GraphQL

{% capture notice--info %}
**Note**

ScalarDB GraphQL Server is now deprecated. Please use [ScalarDB Cluster](./configure-custom-values-scalardb-cluster.md) instead.
{% endcapture %}

<div class="notice--info">{{ notice--info | markdownify }}</div>

This document explains how to create your custom values file for the ScalarDB GraphQL chart. If you want to know the details of the parameters, please refer to the [README](https://github.com/scalar-labs/helm-charts/blob/main/charts/scalardb-graphql/README.md) of the ScalarDB GraphQL chart.

Expand Down Expand Up @@ -47,15 +55,14 @@ ingress:
### Image configurations
You must set `image.repository` and `image.tag`. Please specify the container repository information that you pull the ScalarDB GraphQL container image.
You must set `image.repository`. Be sure to specify the ScalarDB GraphQL container image so that you can pull the image from the container repository.

```yaml
image:
repository: <Container image of ScalarDB GraphQL>
tag: <Tag of image>
repository: <SCALARDB_GRAPHQL_SERVER_CONTAINER_IMAGE>
```

If you use AWS/Azure Marketplace, please refer to the following documents for more details.
If you're using AWS or Azure, please refer to the following documents for more details:

* [How to install Scalar products through AWS Marketplace](https://github.com/scalar-labs/scalar-kubernetes/blob/master/docs/AwsMarketplaceGuide.md)
* [How to install Scalar products through Azure Marketplace](https://github.com/scalar-labs/scalar-kubernetes/blob/master/docs/AzureMarketplaceGuide.md)
Expand Down Expand Up @@ -103,37 +110,17 @@ You can configure them using the same syntax as the affinity of Kubernetes. So,

```yaml
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: scalar-labs.com/dedicated-node
operator: In
values:
- scalardb
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/app
operator: In
values:
- scalardb-graphql
topologyKey: kubernetes.io/hostname
```

### Taints/Tolerations configurations (Recommended in the production environment)

If you want to control pod deployment using the taints and tolerations of Kubernetes, you can use `tolerations`.

You can configure them using the same syntax as the tolerations of Kubernetes. So, please refer to the official document [Taints and Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/) for more details on the tolerations configuration of Kubernetes.

```yaml
tolerations:
- effect: NoSchedule
key: scalar-labs.com/dedicated-node
operator: Equal
value: scalardb
preferredDuringSchedulingIgnoredDuringExecution:
- podAffinityTerm:
labelSelector:
matchExpressions:
- key: app.kubernetes.io/app
operator: In
values:
- scalardb-graphql
topologyKey: kubernetes.io/hostname
weight: 50
```

### Prometheus/Grafana configurations (Recommended in the production environment)
Expand Down Expand Up @@ -216,3 +203,17 @@ If you want to change the log level of ScalarDB GraphQL, you can use `scalarDbGr
scalarDbGraphQlConfiguration:
logLevel: INFO
```

### Taint and toleration configurations (Optional based on your environment)

If you want to control pod deployment by using the taints and tolerations in Kubernetes, you can use `tolerations`.

You can configure taints and tolerations by using the same syntax as the tolerations in Kubernetes. For details on configuring tolerations in Kubernetes, see the official Kubernetes documentation [Taints and Tolerations](https://kubernetes.io/docs/concepts/scheduling-eviction/taint-and-toleration/).

```yaml
tolerations:
- effect: NoSchedule
key: scalar-labs.com/dedicated-node
operator: Equal
value: scalardb
```
Loading

0 comments on commit a79142f

Please sign in to comment.