Skip to content

Commit

Permalink
AUTO: Sync Helm Charts docs to ScalarDB Enterprise docs site repo
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-wong committed Feb 26, 2024
1 parent 3d82404 commit 8fd0f75
Show file tree
Hide file tree
Showing 49 changed files with 1,068 additions and 283 deletions.
8 changes: 4 additions & 4 deletions docs/3.8/helm-charts/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Index

## For users
* [Getting Started with Scalar Helm Charts](./getting-started-scalar-helm-charts.md)
* [Configure a custom values file for Scalar Helm Chart](./configure-custom-values-file.md)
* [Deploy Scalar products using Scalar Helm Charts](./how-to-deploy-scalar-products.md)
* [Getting Started with Scalar Helm Charts](getting-started-scalar-helm-charts.md)
* [Configure a custom values file for Scalar Helm Chart](configure-custom-values-file.md)
* [Deploy Scalar products using Scalar Helm Charts](how-to-deploy-scalar-products.md)

## For developers
* [Release Flow](./ReleaseFlow.md)
* [Release Flow](ReleaseFlow.md)
24 changes: 24 additions & 0 deletions docs/3.8/helm-charts/ReleaseFlow.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Release Flow

## Requirements
| Name | Version | Mandatory | link |
|:------|:-------|:----------|:------|
| Helm | 3.2.1 or latest | no | https://helm.sh/docs/intro/install/ |

## Release
* You create a branch (`prepare-release-*`).
* You make sure to create the tag from the previous version of the target version.
``` console
$ git checkout -b prepare-release-v3.0.2 refs/tags/scalardl-3.0.1
```

* You need to set the `version` of the `Chart.yaml` of each `helm-charts` to the version to be released.
``` yaml
version: 3.0.2
```
* Pushing commits to a remote repository.
``` console
$ git push origin prepare-release-v3.0.2
```

* In this case, the `Github Actions` for the release will be executed upon `Git push`.
25 changes: 25 additions & 0 deletions docs/3.8/helm-charts/conf/scalar-loki-stack-custom-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,28 @@ promtail:
- __meta_kubernetes_pod_uid
- __meta_kubernetes_pod_container_name
target_label: __path__
# -- the `scalar-admin-for-kubernetes` job scrapes all the logs of Scalar Admin for Kubernetes Pods
- job_name: scalar-admin-for-kubernetes
pipeline_stages:
- docker: {}
- cri: {}
kubernetes_sd_configs:
- role: pod
relabel_configs:
- source_labels:
- __meta_kubernetes_pod_node_name
target_label: __host__
- action: replace
source_labels:
- __meta_kubernetes_pod_name
target_label: pod
- action: keep
regex: (.*)scalar-admin-for-kubernetes-(.+)
source_labels:
- pod
- replacement: /var/log/pods/*$1/*.log
separator: /
source_labels:
- __meta_kubernetes_pod_uid
- __meta_kubernetes_pod_container_name
target_label: __path__
19 changes: 10 additions & 9 deletions docs/3.8/helm-charts/configure-custom-values-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@

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 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 Admin for Kubernetes](./configure-custom-values-scalar-admin-for-kubernetes.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)
* [ScalarDB Cluster](configure-custom-values-scalardb-cluster.md)
* [ScalarDB Analytics with PostgreSQL](configure-custom-values-scalardb-analytics-postgresql.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 Admin for Kubernetes](configure-custom-values-scalar-admin-for-kubernetes.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)
Original file line number Diff line number Diff line change
@@ -0,0 +1,185 @@
# Configure a custom values file for ScalarDB Analytics with PostgreSQL

This document explains how to create your custom values file for the ScalarDB Analytics with PostgreSQL chart. For details on the parameters, see the [README](https://github.com/scalar-labs/helm-charts/blob/main/charts/scalardb-analytics-postgresql/README.md) of the ScalarDB Analytics with PostgreSQL chart.

## Required configurations

This section explains the required configurations when setting up a custom values file for ScalarDB Analytics with PostgreSQL.

### Database configurations

To access databases via ScalarDB Analytics with PostgreSQL, you must set the `scalardbAnalyticsPostgreSQL.databaseProperties` parameter by following the same syntax that you use to configure the `database.properties` file. For details about configurations, see [ScalarDB Configurations](https://github.com/scalar-labs/scalardb/blob/master/docs/configurations.md).

```yaml
scalardbAnalyticsPostgreSQL:
databaseProperties: |
scalar.db.contact_points=localhost
scalar.db.username=${env:SCALAR_DB_USERNAME:-}
scalar.db.password=${env:SCALAR_DB_PASSWORD:-}
scalar.db.storage=cassandra
```
### Database namespaces configurations
You must set `schemaImporter.namespaces` to all the database namespaces that include tables you want to read via ScalarDB Analytics with PostgreSQL.

```yaml
schemaImporter:
namespaces:
- namespace1
- namespace2
- namespace3
```

## Optional configurations

This section explains the optional configurations when setting up a custom values file for ScalarDB Analytics with PostgreSQL.

### Resource configurations (recommended in production environments)

To control pod resources by using requests and limits in Kubernetes, you can use `scalardbAnalyticsPostgreSQL.resources`.

You can configure requests and limits by using the same syntax as requests and limits in Kubernetes. For more details on requests and limits in Kubernetes, see [Resource Management for Pods and Containers](https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/).

```yaml
scalardbAnalyticsPostgreSQL:
resources:
requests:
cpu: 1000m
memory: 2Gi
limits:
cpu: 2000m
memory: 4Gi
```

### Secret configurations (recommended in production environments)

To use environment variables to set some properties, like credentials, in `scalardbAnalyticsPostgreSQL.databaseProperties`, you can use `scalardbAnalyticsPostgreSQL.secretName` to specify the secret resource that includes some credentials.

For example, you can set credentials for a backend database (`scalar.db.username` and `scalar.db.password`) by using environment variables, which makes your pods more secure.

For more details on how to use a secret resource, see [How to use Secret resources to pass the credentials as the environment variables into the properties file](use-secret-for-credentials.md).

```yaml
scalardbAnalyticsPostgreSQL:
secretName: "scalardb-analytics-postgresql-credentials-secret"
```

### Affinity configurations (recommended in production environments)

To control pod deployment by using affinity and anti-affinity in Kubernetes, you can use `scalardbAnalyticsPostgreSQL.affinity`.

You can configure affinity and anti-affinity by using the same syntax for affinity and anti-affinity in Kubernetes. For more details on configuring affinity in Kubernetes, see [Assigning Pods to Nodes](https://kubernetes.io/docs/concepts/scheduling-eviction/assign-pod-node/).

```yaml
scalardbAnalyticsPostgreSQL:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- scalardb-analytics-postgresql
- key: app.kubernetes.io/app
operator: In
values:
- scalardb-analytics-postgresql
topologyKey: kubernetes.io/hostname
```

### SecurityContext configurations (default value is recommended)

To set SecurityContext and PodSecurityContext for ScalarDB Analytics with PostgreSQL pods, you can use `scalardbAnalyticsPostgreSQL.securityContext`, `scalardbAnalyticsPostgreSQL.podSecurityContext`, and `schemaImporter.securityContext`.

You can configure SecurityContext and PodSecurityContext by using the same syntax as SecurityContext and PodSecurityContext in Kubernetes. For more details on the SecurityContext and PodSecurityContext configurations in Kubernetes, see [Configure a Security Context for a Pod or Container](https://kubernetes.io/docs/tasks/configure-pod-container/security-context/).

```yaml
scalardbAnalyticsPostgreSQL:
podSecurityContext:
fsGroup: 201
seccompProfile:
type: RuntimeDefault
securityContext:
capabilities:
drop:
- ALL
runAsNonRoot: true
runAsUser: 999
allowPrivilegeEscalation: false
schemaImporter:
securityContext:
capabilities:
drop:
- ALL
runAsNonRoot: true
allowPrivilegeEscalation: false
```

### Image configurations (default value is recommended)

If you want to change the image repository, you can use `scalardbAnalyticsPostgreSQL.image.repository` and `schemaImporter.image.repository` to specify the container repository information of the ScalarDB Analytics with PostgreSQL and Schema Importer images that you want to pull.

```yaml
scalardbAnalyticsPostgreSQL:
image:
repository: <SCALARDB_ANALYTICS_WITH_POSTGRESQL_CONTAINER_IMAGE>
schemaImporter:
image:
repository: <SCHEMA_IMPORTER_CONTAINER_IMAGE>
```

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

You can specify the number of ScalarDB Analytics with PostgreSQL replicas (pods) by using `scalardbAnalyticsPostgreSQL.replicaCount`.

```yaml
scalardbAnalyticsPostgreSQL:
replicaCount: 3
```

### PostgreSQL database name configuration (optional based on your environment)

You can specify the database name that you create in PostgreSQL. Schema Importer creates some objects, such as a view of ScalarDB Analytics with PostgreSQL, in this database.

```yaml
scalardbAnalyticsPostgreSQL:
postgresql:
databaseName: scalardb
```

### PostgreSQL superuser password configuration (optional based on your environment)

You can specify the secret name that includes the superuser password for PostgreSQL.

```yaml
scalardbAnalyticsPostgreSQL:
postgresql:
secretName: scalardb-analytics-postgresql-superuser-password
```

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

You must create a secret resource with this name (`scalardb-analytics-postgresql-superuser-password` by default) before you deploy ScalarDB Analytics with PostgreSQL. For details, see [Prepare a secret resource](how-to-deploy-scalardb-analytics-postgresql.md#prepare-a-secret-resource).
{% endcapture %}

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

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

If you want to control pod deployment by using taints and tolerations in Kubernetes, you can use `scalardbAnalyticsPostgreSQL.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
scalardbAnalyticsPostgreSQL:
tolerations:
- effect: NoSchedule
key: scalar-labs.com/dedicated-node
operator: Equal
value: scalardb-analytics-postgresql
```
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ To use environment variables to set some properties (e.g., credentials) in `scal

For example, you can set credentials for a backend database (`scalar.db.username` and `scalar.db.password`) by using environment variables, which makes your pods more secure.

For more details on how to use a Secret resource, see [How to use Secret resources to pass the credentials as the environment variables into the properties file](./use-secret-for-credentials.md).
For more details on how to use a Secret resource, see [How to use Secret resources to pass the credentials as the environment variables into the properties file](use-secret-for-credentials.md).

```yaml
scalardbCluster:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% capture notice--info %}
**Note**

ScalarDB GraphQL Server is now deprecated. Please use [ScalarDB Cluster](./configure-custom-values-scalardb-cluster.md) instead.
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>
Expand Down
4 changes: 2 additions & 2 deletions docs/3.8/helm-charts/configure-custom-values-scalardb.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% capture notice--info %}
**Note**

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

<div class="notice--info">{{ notice--info | markdownify }}</div>
Expand Down Expand Up @@ -91,7 +91,7 @@ If you want to use environment variables to set some properties (e.g., credentia

For example, you can set credentials for a backend database (`scalar.db.username` and `scalar.db.password`) using environment variables, which makes your pods more secure.

Please refer to the document [How to use Secret resources to pass the credentials as the environment variables into the properties file](./use-secret-for-credentials.md) for more details on how to use a Secret resource.
Please refer to the document [How to use Secret resources to pass the credentials as the environment variables into the properties file](use-secret-for-credentials.md) for more details on how to use a Secret resource.

```yaml
scalardb:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ You must set a private key file to `scalar.dl.auditor.private_key_path` and a ce

You must also mount the private key file and the certificate file on the ScalarDL Auditor pod.

For more details on how to mount the private key file and the certificate file, refer to [Mount key and certificate files on a pod in ScalarDL Helm Charts](./mount-files-or-volumes-on-scalar-pods.md#mount-key-and-certificate-files-on-a-pod-in-scalardl-helm-charts).
For more details on how to mount the private key file and the certificate file, refer to [Mount key and certificate files on a pod in ScalarDL Helm Charts](mount-files-or-volumes-on-scalar-pods.md#mount-key-and-certificate-files-on-a-pod-in-scalardl-helm-charts).

## Optional configurations

Expand Down Expand Up @@ -86,7 +86,7 @@ If you want to use environment variables to set some properties (e.g., credentia

For example, you can set credentials for a backend database (`scalar.db.username` and `scalar.db.password`) using environment variables, which makes your pods more secure.

Please refer to the document [How to use Secret resources to pass the credentials as the environment variables into the properties file](./use-secret-for-credentials.md) for more details on how to use a Secret resource.
Please refer to the document [How to use Secret resources to pass the credentials as the environment variables into the properties file](use-secret-for-credentials.md) for more details on how to use a Secret resource.

```yaml
auditor:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ If you set `scalar.dl.ledger.proof.enabled` to `true` (this configuration is req

In this case, you must mount the private key file on the ScalarDL Ledger pod.

For more details on how to mount the private key file, refer to [Mount key and certificate files on a pod in ScalarDL Helm Charts](./mount-files-or-volumes-on-scalar-pods.md#mount-key-and-certificate-files-on-a-pod-in-scalardl-helm-charts).
For more details on how to mount the private key file, refer to [Mount key and certificate files on a pod in ScalarDL Helm Charts](mount-files-or-volumes-on-scalar-pods.md#mount-key-and-certificate-files-on-a-pod-in-scalardl-helm-charts).

## Optional configurations

Expand Down Expand Up @@ -86,7 +86,7 @@ If you want to use environment variables to set some properties (e.g., credentia

For example, you can set credentials for a backend database (`scalar.db.username` and `scalar.db.password`) using environment variables, which makes your pods more secure.

Please refer to the document [How to use Secret resources to pass the credentials as the environment variables into the properties file](./use-secret-for-credentials.md) for more details on how to use a Secret resource.
Please refer to the document [How to use Secret resources to pass the credentials as the environment variables into the properties file](use-secret-for-credentials.md) for more details on how to use a Secret resource.

```yaml
ledger:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ If you want to use environment variables to set some properties (e.g., credentia

For example, you can set credentials for a backend database (`scalar.db.username` and `scalar.db.password`) using environment variables, which makes your pods more secure.

Please refer to the document [How to use Secret resources to pass the credentials as the environment variables into the properties file](./use-secret-for-credentials.md) for more details on how to use a Secret resource.
Please refer to the document [How to use Secret resources to pass the credentials as the environment variables into the properties file](use-secret-for-credentials.md) for more details on how to use a Secret resource.

```yaml
schemaLoading:
Expand Down
Loading

0 comments on commit 8fd0f75

Please sign in to comment.