# HOW TO MAKE YOUR PROPER VALUES.YAML

Use command :
```
oc-k8s create values [release] [env_file (optionnal)]
```
or 
```
./oc-k8s.sh create values [release] [env_file (optionnal)]
```

Map in a env file, any Variable you wish to override and give the path. 

## ENV VARIABLE

| Variable       | Default                | Purpose / Explanation                                                             |
| -------------- | ---------------------- | --------------------------------------------------------------------------------- |
| `HOST`         | `exemple.com`          | Domain for reverse proxy rules (Traefik).                                         |
| `REGISTRY_HOST` | `registry.exemple.com` | Docker registry URL for reverse proxy and pull secrets.                           |

## MONGO VARIABLE

| Variable            | Default     | Purpose / Explanation                      |
| ------------------- | ----------- | ------------------------------------------ |
| `OC_MONGO_ENABLED`  | `true`      | Enable/disable MongoDB deployment.         |
| `OC_MONGO_ADMIN`    | `admin`     | Root username for MongoDB.                 |
| `OC_MONGO_PWD`      | `admin`     | Root password.                             |
| `OC_MONGO_DATABASE` | `opencloud` | Default database to create.                |
| `OC_MONGO_SIZE`     | `5000Mi`    | Persistent storage size for MongoDB.       |

## MONGO EXPRESS VARIABLE

| Variable                                  | Default                                                  | Purpose / Explanation                       |
| ----------------------------------------- | -------------------------------------------------------- | ------------------------------------------- |
| `OC_MONGOEXPRESS_ENABLED`                 | `true`                                                   | Enable mongo-express UI.                    |
| `OC_MONGOEXPRESS_ADMIN`                   | `${OC_MONGO_ADMIN:-admin}`                               | Admin username to connect to MongoDB.       |
| `OC_MONGOEXPRESS_PWD`                     | `${OC_MONGO_PWD:-admin}`                                 | Admin password.                             |

## NATS VARIABLE 

| Variable          | Default | Explanation                            |
| ----------------- | ------- | -------------------------------------- |
| `OC_NATS_ENABLED` | `true`  | Deploy NATS cluster.                   |
| `OC_NATS_SIZE`    | `20Mi`  | Storage size for JetStream file store. |

## OpenLDAP VARIABLE

| Variable                    | Default                      | Explanation                                              |
| --------------------------- | ---------------------------- | -------------------------------------------------------- |
| `OC_LDAP_ENABLED`           | `true`                       | Deploy OpenLDAP server.                                  |
| `OC_LDAP_IMAGE`             | `osixia/openldap`            | Docker image for OpenLDAP.                               |
| `OC_LDAP_ORGANISATION`      | `Opencloud`                  | LDAP organization name.                                  |
| `OC_LDAP_DOMAIN`            | `opencloud.com`              | LDAP domain.                                             |
| `OC_LDAP_TLS`               | `false`                      | Enable TLS for LDAP.                                     |
| `OC_LDAP_ADMIN_PWD`         | `admin`                      | LDAP admin password.                                     |
| `OC_LDAP_CONFIG_PWD`        | `config`                     | Password for configuration account.                      |
| `OC_LDAP_EXTERNAL`          | `false`                      | Connect to external LDAP instead of internal deployment. |
| `OC_LDAP_EXTERNAL_ENDPOINT` | (none)                       | LDAP server URL.                                         |
| `OC_LDAP_EXTERNAL_DN`       | `cn=admin,dc=example,dc=com` | Bind DN for external LDAP.                               |
| `OC_LDAP_EXTERNAL_PWD`      | `admin`                      | Bind password for external LDAP.                         |

## Prometheus VARIABLE

| Variable                        | Default | Explanation               |
| ------------------------------- | ------- | ------------------------- |
| `OC_PROMETHEUS_ENABLED`         | `true`  | Enable Prometheus server. |
| `OC_PROMETHEUS_SIZE`            | `5Gi`   | Persistent volume size.   |
| `OC_PROMETHEUS_LIMITS_CPU`      | `500m`  | CPU limit.                |
| `OC_PROMETHEUS_LIMITS_MEMORY`   | `512Mi` | Memory limit.             |
| `OC_PROMETHEUS_REQUESTS_CPU`    | `128m`  | CPU request.              |
| `OC_PROMETHEUS_REQUESTS_MEMORY` | `256Mi` | Memory request.           |

## Grafana VARIABLE

| VARIABLE                               | DEFAULT     | DESCRIPTION                                                                          |
| -------------------------------------- | ----------- | ------------------------------------------------------------------------------------ |
| `OC_GRAFANA_ENABLED`                   | `true`      | Enable or disable Grafana deployment.                                                |
| `OC_GRAFANA_ADMIN_USER`                | `admin`     | Username for the Grafana admin account.                                              |
| `OC_GRAFANA_ADMIN_PWD`                 | `admin`     | Password for the Grafana admin account.                                              |
| `OC_GRAFANA_SIZE`                      | `1Gi`       | Size of the persistent volume for Grafana.                                           |

## Traefik VARIABLE

| Variable                        | Default | Explanation               |
| ------------------------------- | ------- | ------------------------- |
| `OC_TRAEFIK_ENABLED`            | `true`  | Enable Traefik server.    |

## Hydra VARIABLE

| Variable           | Default                                                                  | Explanation                                 |
| ------------------ | ------------------------------------------------------------------------ | ------------------------------------------- |
| `OC_HYDRA_ENABLED` | `true`                                                                   | Deploy Hydra (OAuth2).                      |

## Keto VARIABLE

| VARIABLE                     | DEFAULT                           | DESCRIPTION                                                                                    |
| ---------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------- |
| `OC_KETO_ENABLED`            | `true`                            | Enable or disable Keto deployment.                                                             |

## Loki VARIABLE

| VARIABLE                     | DEFAULT                           | DESCRIPTION                                                                                    |
| ---------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------- |
| `OC_LOKI_ENABLED`            | `true`                            | Enable or disable Loki deployment.                                                             |
| `OC_LOKI_SIZE`               | `1Gi`                             | Resource allowed.                                                                              |

## Minio VARIABLE

| VARIABLE                     | DEFAULT                           | DESCRIPTION                                                                                    |
| ---------------------------- | --------------------------------- | ---------------------------------------------------------------------------------------------- |
| `OC_MINIO_ENABLED`           | `true`                            | Enable or disable Minio deployment.                                                            |

## Argo VARIABLE 

| VARIABLE                                   | DEFAULT         | DESCRIPTION                                    |
| ------------------------------------------ | --------------- | ---------------------------------------------- |
| `OC_ARGO_ENABLED`                          | `false`         | Enable or disable Argo Workflows deployment.   |

## OC API VARIABLE

| Variable                             | Default      | Explanation                       |
| ------------------------------------ | ------------ | --------------------------------- |
| `OC_<APP>_ENABLED`                   | true         | Deploy the service.               |
| `OC_<APP>_IMAGE`                     | registry URL | Docker image.                     |
| `OC_<APP>_LIMITS_CPU/MEMORY`         | 128m / 256Mi | Resource limits.                  |
| `OC_<APP>_REQUESTS_CPU/MEMORY`       | 128m / 256Mi | Resource requests.                |
| `OC_<APP>_REPLICAS_ENABLED`          | true         | Enable Horizontal Pod Autoscaler. |
| `OC_<APP>_REPLICAS_MAX`              | 5            | Max replicas.                     |
| `OC_<APP>_REPLICAS_USAGE`            | 80           | HPA target CPU usage (%).         |
