Skip to content

Commit

Permalink
Merge branch 'AOT-Technologies:staging/QA' into staging/QA
Browse files Browse the repository at this point in the history
  • Loading branch information
alanraju-aot authored Jan 8, 2025
2 parents b34fa52 + dfa01b4 commit 015d56f
Show file tree
Hide file tree
Showing 85 changed files with 3,980 additions and 824 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/pr-notification.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: PR Notification to Google Chat

on:
pull_request:
pull_request_target:
types: [opened, synchronize, closed]
branches:
- master
Expand All @@ -10,7 +10,7 @@ on:
jobs:
notify:
runs-on: ubuntu-latest
if: github.repository == 'AOT-Technologies/forms-flow-ai-charts'
if: github.event.pull_request.base.repo.full_name == 'AOT-Technologies/forms-flow-ai-charts' || github.event.pull_request.head.repo.full_name == 'AOT-Technologies/forms-flow-ai-charts'

steps:
- name: Determine PR Status
Expand All @@ -26,14 +26,6 @@ jobs:
echo "status=🟢 Open" >> $GITHUB_ENV
fi
- name: Confirm PR_NOTIFICATION Secret is Set
run: |
if [[ -z "${{ secrets.PR_NOTIFICATION }}" ]]; then
echo "PR_NOTIFICATION secret is not set."
else
echo "PR_NOTIFICATION secret is set."
fi
- name: Send notification to Google Chat
uses: fjogeleit/[email protected]
with:
Expand All @@ -46,8 +38,7 @@ jobs:
{
"header": {
"title": "Open source: Pull Request Opened by ${{ github.event.pull_request.user.login }}",
"subtitle": "Pull Request #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}",
"imageUrl": "${{ github.event.pull_request.user.avatar_url }}"
"subtitle": "Pull Request #${{ github.event.pull_request.number }}: ${{ github.event.pull_request.title }}"
},
"sections": [
{
Expand Down
65 changes: 65 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<div align="center"><img src="https://149641023.v2.pressablecdn.com/wp-content/uploads/2022/05/Site_logo.png"/></div>
<hr/>


[**formsflow.ai**](https://formsflow.ai/) is a Free, Open-Source, Low Code Development Platform for rapidly building powerful business applications. [**formsflow.ai**](https://formsflow.ai/) combines leading Open-Source applications including [form.io](https://form.io) forms, Camunda’s workflow engine, Keycloak’s security, and Redash’s data analytics into a seamless, integrated platform.


## Before you begin

### Prerequisites

- Kubernetes 1.23+
- Helm 3.8.0+

### Setup a Kubernetes Cluster

The quickest way to set up a Kubernetes cluster to install [formsflow.ai](https://formsflow.ai/) Charts is by following the "[formsflow.ai](https://formsflow.ai/) Get Started" guides for the different services:

- [Get Started with Formsflow Charts using the Amazon Elastic Container Service for Kubernetes (EKS)](https://aot-technologies.github.io/forms-flow-installation-eks/docs/intro/)

### Install Helm

Helm is a tool for managing Kubernetes charts. Charts are packages of pre-configured Kubernetes resources.

To install Helm, refer to the [Helm install guide](https://github.com/helm/helm#install) and ensure that the `helm` binary is in the `PATH` of your shell.

### Using Helm

Once you have installed the Helm client, you can deploy a Bitnami Helm Chart into a Kubernetes cluster.

Please refer to the [Quick Start guide](https://helm.sh/docs/intro/quickstart/) if you wish to get running in just a few commands, otherwise, the [Using Helm Guide](https://helm.sh/docs/intro/using_helm/) provides detailed instructions on how to use the Helm client to manage packages on your Kubernetes cluster.

## License

Copyright 2020 AppsOnTime-Technologies 2020

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

## Chart Versions

The versions of Helm charts available in this repository are as follows:

| Formsflow Version | Chart Name | Chart Version |
|---------------------------|---------------------------|---------------------------|
| 7.0.0 | forms-flow-ai | v8.0.0 |
| 6.0.2 | forms-flow-ai | v7.1.2 |
| 6.0.1 | forms-flow-ai | v7.1.1 |
| 6.0.0 | forms-flow-ai | v6.0.0 |
| 5.3.1 | forms-flow-ai | v5.3.1 |
| 5.3.0 | forms-flow-ai | v5.3.0 |
| 5.2.2 | forms-flow-ai | v5.2.2 |
| 5.2.1 | forms-flow-ai | v5.2.1 |
| 5.2.0 | forms-flow-ai | v5.2.0 |
| 5.1.1 | forms-flow-ai | v5.1.1 |
| 5.1.0 | forms-flow-ai | v5.1.0 |
191 changes: 191 additions & 0 deletions charts/forms-flow-admin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
# Formsflow Admin API

Formsflow Admin API is a Python REST API to provision tenants in a multi tenanted environment.


## Introduction

This chart bootstraps a forms-flow-admin deployment on a [Kubernetes](https://kubernetes.io) cluster using the [Helm](https://helm.sh) package manager.


## Installing the Chart

To install the chart with the release name `forms-flow-admin`:

```console
helm install forms-flow-admin forms-flow-admin
```

Specify each parameter using the `--set key=value[,key=value]` argument to `helm install`. For example,

```console
helm install forms-flow-admin forms-flow-admin --set ingress.ingressClassName=INGRESS_CLASS --set ingress.hostname=HOSTNAME
```

> Note: You need to substitute the placeholders `INGRESS_CLASS` and `HOSTNAME` with a reference to your Helm chart registry and repository. For example, in the case of Formsflow, you need to use`INGRESS_CLASS=nginx`
These commands deploy Forms-flow-admin on the Kubernetes cluster

> **Tip**: List all releases using `helm list`
### Resource requests and limits

Forms-flow-admin charts allow setting resource requests and limits for all containers inside the chart deployment. These are inside the `resources` value (check parameter table). Setting requests is essential for production workloads and these should be adapted to your specific use case.

```yaml
resources:
limits:
cpu: 500m
memory: 1Gi
requests:
cpu: 250m
memory: 512Mi
```
### Change Forms-flow-admin version
To modify the Forms-flow-admin version used in this chart you can specify a [valid image tag](https://hub.docker.com/repository/docker/formsflow/forms-flow-ai-admin) using the `image.tag` parameter. For example, `image.tag=X.Y.Z`. This approach is also applicable to other images like exporters.

```yaml
image:
registry: docker.io
repository: formsflow/forms-flow-ai-admin
tag: X.Y.Z
```

## Persistence

The `formsflow-admin` image stores the application logs at the `/opt/app-root/logs` path of the container.


## Sidecar Configuration

To add a sidecar to your `Forms-flow-admin` deployment, you can use the following configuration. In this case, the sidecar container is an Nginx container used for configuration management.

### Example Sidecar Configuration

```yaml
sidecars:
- name: nginx
image: nginx:latest
ports:
- containerPort: 80
volumeMounts:
- name: nginx-config-volume
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
```

## API Path Update
The `Forms-flow-admin` can now be accessed at the `/admin` route. Ensure that all configurations and requests reference this updated path.

For example:

```
https://<HOSTNAME>/admin
```

## Parameters

| Parameter | Description | Default Value |
|------------------------------------|-----------------------------------------------------|------------------------------------|
| `replicaCount` | Number of replicas | `1` |
| `image.registry` | Docker registry for the image | `docker.io` |
| `image.repository` | Repository for the image | `formsflow/forms-flow-ai-admin` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `image.tag` | Image tag | `v7.0.0-alpha` |
| `image.pullSecrets` | Array of image pull secrets | `forms-flow-ai-auth` |
| `nameOverride` | String to partially override common.names.fullname | `""` |
| `fullnameOverride` | String to fully override common.names.fullname | `""` |
| `commonLabels` | Labels to add to all deployed objects | `{}` |
| `commonAnnotations` | Annotations to add to all deployed objects | `{}` |
| `nodeSelector` | Node labels for pod assignment | `{}` |
| `tolerations` | Tolerations for pod assignment | `[]` |
| `affinity` | Affinity for pod assignment | `{}` |
| `priorityClassName` | Pod priority | `""` |
| `schedulerName` | Name of the k8s scheduler | `""` |
| `terminationGracePeriodSeconds` | Time given to the pod to terminate gracefully | `""` |
| `topologySpreadConstraints` | Topology Spread Constraints for pod assignment | `[]` |
| `diagnosticMode.enabled` | Enable diagnostic mode | `false` |
| `diagnosticMode.command` | Command to override all containers in deployment | `["sleep"]` |
| `diagnosticMode.args` | Args to override all containers in deployment | `["infinity"]` |
| `hostAliases` | Deployment host aliases | `[]` |
| `serviceAccount.create` | Whether a service account should be created | `true` |
| `serviceAccount.annotations` | Annotations for the service account | `{}` |
| `serviceAccount.name` | Name of the service account | `""` |
| `serviceAccount.automountServiceAccountToken` | Mount Service Account token in pod | `false` |
| `podAnnotations` | Pod annotations | `{}` |
| `podLabels` | Extra labels for pods | `{}` |
| `podAffinityPreset` | Pod affinity preset | `""` |
| `podAntiAffinityPreset` | Pod anti-affinity preset | `soft` |
| `nodeAffinityPreset.type` | Node affinity preset type | `""` |
| `nodeAffinityPreset.key` | Node label key to match | `""` |
| `nodeAffinityPreset.values` | Node label values to match | `[]` |
| `podSecurityContext.enabled` | Enable security context for pods | `true` |
| `podSecurityContext.fsGroupChangePolicy` | Set filesystem group change policy | `Always` |
| `podSecurityContext.fsGroup` | Pod's Security Context fsGroup | `1001` |
| `containerSecurityContext.enabled` | Enable containers' Security Context | `true` |
| `containerSecurityContext.runAsUser` | Containers' Security Context runAsUser | `1001` |
| `containerSecurityContext.runAsGroup` | Containers' Security Context runAsGroup | `1001` |
| `containerSecurityContext.runAsNonRoot` | Container's Security Context runAsNonRoot | `false` |
| `command` | Override default container command | `[]` |
| `args` | Override default container args | `[]` |
| `lifecycleHooks` | Lifecycle hooks for containers | `{}` |
| `extraEnvVars` | Extra environment variables for containers | `[]` |
| `extraEnvVarsCM` | Name of existing ConfigMap containing extra env vars| `""` |
| `extraVolumes` | Array to add extra volumes | `{}` |
| `extraVolumeMounts` | Array to add extra mounts | `{}` |
| `existingSecret` | Existing secret containing database credentials | `""` |
| `updateStrategy.type` | Update strategy for installation | `RollingUpdate` |
| `rbac.create` | Whether to create and use RBAC resources | `false` |
| `pdb.create` | If true, create a pod disruption budget | `true` |
| `autoscaling.enabled` | Enable autoscaling for forms-flow-admin | `false` |
| `formsflow.configmap` | Name of the formsflow.ai ConfigMap | `forms-flow-ai` |
| `formsflow.secret` | Name of the formsflow.ai secret | `forms-flow-ai` |
| `formsflow.analytics` | Name of the analytics component | `forms-flow-analytics` |

## Ingress Parameters

| Parameter | Description | Default Value |
|------------------------------------|-----------------------------------------------------|------------------------------------|
| `ingress.enabled` | Enable ingress record generation | `true` |
| `ingress.ingressClassName` | Ingress class used to implement Ingress | `""` |
| `ingress.pathType` | Ingress path type | `ImplementationSpecific` |
| `ingress.controller` | Ingress controller type | `default` |
| `ingress.hostname` | Default host for the ingress record | `forms-flow-admin.local` |
| `ingress.path` | Default path for the ingress record | `"/admin"` |
| `ingress.servicePort` | Backend service port to use | `5000` |
| `ingress.tls` | Enable TLS configuration | `true` |
| `ingress.selfSigned` | Create a TLS secret using self-signed certificates | `false` |

## Service Parameters

| Parameter | Description | Default Value |
|------------------------------------|-----------------------------------------------------|------------------------------------|
| `service.type` | Kubernetes service type (`ClusterIP`, `NodePort`, or `LoadBalancer`) | `ClusterIP` |
| `service.ports` | Forms-flow-admin service ports | `[{name: http, port: 5000, protocol: TCP}]` |

## Resource Parameters

| Parameter | Description | Default Value |
|------------------------------------|-----------------------------------------------------|------------------------------------|
| `resourcesPreset` | Set container resources according to preset | `small` |
| `resources.limits.cpu` | CPU limit | `500m` |
| `resources.limits.memory` | Memory limit | `1Gi` |
| `resources.requests.cpu` | CPU request | `250m` |
| `resources.requests.memory` | Memory request | `512Mi` |

## Database Parameters

| Parameter | Description | Default Value |
|------------------------------------|-----------------------------------------------------|------------------------------------|
| `postgresql.databasename` | Database name for PostgreSQL | `forms-flow-admin` |
| `postgresql.username` | PostgreSQL username | `postgres` |
| `postgresql.password` | PostgreSQL password | `postgres` |
| `postgresql.host` | PostgreSQL host | `forms-flow-ai-postgresql-ha-pgpool` |
| `ExternalDatabase.ExistingDatabaseNameKey` | Key for the existing database name | `""` |
| `ExternalDatabase.ExistingDatabaseUserNameKey` | Key for the existing database username | `""` |
| `ExternalDatabase.ExistingDatabasePasswordKey` | Key for the existing database password | `""` |
| `ExternalDatabase.ExistingDatabaseHostKey` | Key for the existing database host | `""` |
| `ExternalDatabase.ExistingDatabasePortKey` | Key for the existing database port | `""` |
| `ExternalDatabase.ExistingSecretName` | Name of the existing secret | `""` |
Loading

0 comments on commit 015d56f

Please sign in to comment.