From f8117afa1560a9949e713d6c8f0f480a15ab7937 Mon Sep 17 00:00:00 2001 From: Jordan CARRIER Date: Thu, 26 Dec 2024 15:47:15 +0100 Subject: [PATCH] refacto : chart --- .gitignore | 2 + charts/armonik/.helmignore | 24 ++ charts/armonik/Chart.lock | 54 +++ charts/armonik/Chart.yaml | 92 +++++ charts/armonik/README.md | 104 ++++++ .../charts/compute-plane}/.helmignore | 46 +-- .../armonik/charts/compute-plane/Chart.yaml | 18 + charts/armonik/charts/compute-plane/README.md | 212 ++++++++++++ .../charts/compute-plane/templates/NOTES.txt | 2 + .../compute-plane/templates/_helpers.tpl | 62 ++++ .../templates/compute-plane-configmap.yaml | 13 + .../templates/compute-plane-deployment.yaml | 171 +++++++++ .../templates/polling-agent-configmap.yaml | 13 + .../templates/worker-configmap.yaml | 16 + .../armonik/charts/compute-plane/values.yaml | 325 ++++++++++++++++++ .../charts/control-plane}/.helmignore | 46 +-- .../armonik/charts/control-plane/Chart.yaml | 18 + charts/armonik/charts/control-plane/README.md | 157 +++++++++ .../charts/control-plane/templates/NOTES.txt | 6 + .../control-plane/templates/_helpers.tpl | 65 ++++ .../templates/control-plane-configmap.yaml | 18 + .../templates/control-plane-deployment.yaml | 117 +++++++ .../templates/control-plane-secrets.yaml | 72 ++++ .../templates/control-plane-service.yaml | 33 ++ .../templates/core-configmap.yaml | 16 + .../templates/log-configmap.yaml | 20 ++ .../tests/control_plane_configmap_test.yaml | 21 ++ .../tests/control_plane_deployment_test.yaml | 44 +++ .../tests/core_configmap_test.yaml | 16 + .../tests/log_configmap_test.yaml | 11 + .../armonik/charts/control-plane/values.yaml | 238 +++++++++++++ charts/armonik/charts/eniconfig/.helmignore | 23 ++ charts/armonik/charts/eniconfig/Chart.yaml | 14 + .../{ => armonik/charts}/eniconfig/README.md | 58 ++-- .../charts}/eniconfig/templates/NOTES.txt | 2 +- .../charts}/eniconfig/templates/_helpers.tpl | 124 +++---- .../eniconfig/templates/eniconfig.yaml | 26 +- .../charts}/eniconfig/values.yaml | 12 +- charts/armonik/charts/ingress/.helmignore | 23 ++ charts/armonik/charts/ingress/Chart.yaml | 14 + charts/armonik/charts/ingress/README.md | 56 +++ .../charts/ingress/templates/NOTES.txt | 2 + .../charts/ingress}/templates/_helpers.tpl | 124 +++---- .../charts/ingress/templates/ingress.yaml | 35 ++ charts/armonik/charts/ingress/values.yaml | 100 ++++++ charts/armonik/templates/NOTES.txt | 22 ++ charts/armonik/templates/_helpers.tpl | 62 ++++ charts/armonik/templates/core-configmap.yaml | 14 + charts/armonik/templates/log-configmap.yaml | 18 + .../templates/tests/test-connection.yaml | 15 + charts/armonik/values.yaml | 180 ++++++++++ charts/best-practices.md | 277 +++++++++++++++ charts/eniconfig/Chart.yaml | 37 -- charts/keda-hpa/Chart.yaml | 37 -- charts/keda-hpa/README.md | 50 --- charts/keda-hpa/templates/scale-object.yaml | 34 -- charts/keda-hpa/values.yaml | 51 --- 57 files changed, 3033 insertions(+), 429 deletions(-) create mode 100644 charts/armonik/.helmignore create mode 100644 charts/armonik/Chart.lock create mode 100644 charts/armonik/Chart.yaml create mode 100644 charts/armonik/README.md rename charts/{eniconfig => armonik/charts/compute-plane}/.helmignore (93%) create mode 100644 charts/armonik/charts/compute-plane/Chart.yaml create mode 100644 charts/armonik/charts/compute-plane/README.md create mode 100644 charts/armonik/charts/compute-plane/templates/NOTES.txt create mode 100644 charts/armonik/charts/compute-plane/templates/_helpers.tpl create mode 100644 charts/armonik/charts/compute-plane/templates/compute-plane-configmap.yaml create mode 100644 charts/armonik/charts/compute-plane/templates/compute-plane-deployment.yaml create mode 100644 charts/armonik/charts/compute-plane/templates/polling-agent-configmap.yaml create mode 100644 charts/armonik/charts/compute-plane/templates/worker-configmap.yaml create mode 100644 charts/armonik/charts/compute-plane/values.yaml rename charts/{keda-hpa => armonik/charts/control-plane}/.helmignore (93%) create mode 100644 charts/armonik/charts/control-plane/Chart.yaml create mode 100644 charts/armonik/charts/control-plane/README.md create mode 100644 charts/armonik/charts/control-plane/templates/NOTES.txt create mode 100644 charts/armonik/charts/control-plane/templates/_helpers.tpl create mode 100644 charts/armonik/charts/control-plane/templates/control-plane-configmap.yaml create mode 100644 charts/armonik/charts/control-plane/templates/control-plane-deployment.yaml create mode 100644 charts/armonik/charts/control-plane/templates/control-plane-secrets.yaml create mode 100644 charts/armonik/charts/control-plane/templates/control-plane-service.yaml create mode 100644 charts/armonik/charts/control-plane/templates/core-configmap.yaml create mode 100644 charts/armonik/charts/control-plane/templates/log-configmap.yaml create mode 100644 charts/armonik/charts/control-plane/tests/control_plane_configmap_test.yaml create mode 100644 charts/armonik/charts/control-plane/tests/control_plane_deployment_test.yaml create mode 100644 charts/armonik/charts/control-plane/tests/core_configmap_test.yaml create mode 100644 charts/armonik/charts/control-plane/tests/log_configmap_test.yaml create mode 100644 charts/armonik/charts/control-plane/values.yaml create mode 100644 charts/armonik/charts/eniconfig/.helmignore create mode 100644 charts/armonik/charts/eniconfig/Chart.yaml rename charts/{ => armonik/charts}/eniconfig/README.md (78%) rename charts/{ => armonik/charts}/eniconfig/templates/NOTES.txt (97%) rename charts/{ => armonik/charts}/eniconfig/templates/_helpers.tpl (96%) rename charts/{ => armonik/charts}/eniconfig/templates/eniconfig.yaml (95%) rename charts/{ => armonik/charts}/eniconfig/values.yaml (96%) create mode 100644 charts/armonik/charts/ingress/.helmignore create mode 100644 charts/armonik/charts/ingress/Chart.yaml create mode 100644 charts/armonik/charts/ingress/README.md create mode 100644 charts/armonik/charts/ingress/templates/NOTES.txt rename charts/{keda-hpa => armonik/charts/ingress}/templates/_helpers.tpl (71%) create mode 100644 charts/armonik/charts/ingress/templates/ingress.yaml create mode 100644 charts/armonik/charts/ingress/values.yaml create mode 100644 charts/armonik/templates/NOTES.txt create mode 100644 charts/armonik/templates/_helpers.tpl create mode 100644 charts/armonik/templates/core-configmap.yaml create mode 100644 charts/armonik/templates/log-configmap.yaml create mode 100644 charts/armonik/templates/tests/test-connection.yaml create mode 100644 charts/armonik/values.yaml create mode 100644 charts/best-practices.md delete mode 100644 charts/eniconfig/Chart.yaml delete mode 100644 charts/keda-hpa/Chart.yaml delete mode 100644 charts/keda-hpa/README.md delete mode 100644 charts/keda-hpa/templates/scale-object.yaml delete mode 100644 charts/keda-hpa/values.yaml diff --git a/.gitignore b/.gitignore index 4762d02bb..5fd716ee7 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,5 @@ terraform-plugins kubeconfig_* generated .external_modules +**.tgz +**.DS_Store diff --git a/charts/armonik/.helmignore b/charts/armonik/.helmignore new file mode 100644 index 000000000..6120f6fd5 --- /dev/null +++ b/charts/armonik/.helmignore @@ -0,0 +1,24 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.tgz +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/armonik/Chart.lock b/charts/armonik/Chart.lock new file mode 100644 index 000000000..60d64e25f --- /dev/null +++ b/charts/armonik/Chart.lock @@ -0,0 +1,54 @@ +dependencies: +- name: control-plane + repository: file://charts/control-plane + version: 0.1.0 +- name: compute-plane + repository: file://charts/compute-plane + version: 0.1.0 +- name: ingress + repository: file://charts/ingress + version: 0.1.0 +- name: eniconfig + repository: file://charts/eniconfig + version: 0.1.0 +- name: minio + repository: https://charts.bitnami.com/bitnami + version: 14.8.6 +- name: redis + repository: https://charts.bitnami.com/bitnami + version: 20.4.0 +- name: activemq-artemis + repository: https://kahootali.github.io/activemq-artemis-helm/ + version: 1.0.1 +- name: mongodb + repository: https://charts.bitnami.com/bitnami + version: 16.3.2 +- name: mongodb-sharded + repository: https://charts.bitnami.com/bitnami + version: 9.0.3 +- name: prometheus + repository: https://charts.bitnami.com/bitnami + version: 1.3.29 +- name: rabbitmq + repository: https://charts.bitnami.com/bitnami + version: 15.1.0 +- name: keda + repository: https://kedacore.github.io/charts + version: 2.16.1 +- name: metrics-server + repository: https://kubernetes-sigs.github.io/metrics-server/ + version: 3.12.2 +- name: cluster-autoscaler + repository: https://kubernetes.github.io/autoscaler + version: 9.43.2 +- name: aws-node-termination-handler + repository: https://aws.github.io/eks-charts + version: 0.21.0 +- name: aws-efs-csi-driver + repository: https://kubernetes-sigs.github.io/aws-efs-csi-driver/ + version: 3.1.3 +- name: chaos-mesh + repository: https://charts.chaos-mesh.org + version: 2.6.3 +digest: sha256:1dfd8a32b2ee617f08d78b951aca3cab91e460a270547986f6c5df59d0054302 +generated: "2024-12-26T15:41:11.477411+01:00" diff --git a/charts/armonik/Chart.yaml b/charts/armonik/Chart.yaml new file mode 100644 index 000000000..090f5fa9f --- /dev/null +++ b/charts/armonik/Chart.yaml @@ -0,0 +1,92 @@ +apiVersion: v2 +appVersion: "0.2.2" +version: 0.1.0 +name: armonik +description: A Helm chart for Armonik +icon: https://25070129.fs1.hubspotusercontent-eu1.net/hubfs/25070129/Website/Images%20-%20Website/ArmoniK/logo_armonik_by_aneo%201.svg +kubeVersion: ">=v1.23.0-0" +keywords: + - armonik + - helm +type: application +home: https://github.com/aneoconsulting/ArmoniK +sources: + - https://aneoconsulting.github.io/ +maintainers: + - name: Aneo + email: armonik-support@aneo.fr + url: armonik.fr + +dependencies: +### Armonik + - name: control-plane + version: 0.1.0 + repository: file://charts/control-plane + condition: control-plane.enabled + - name: compute-plane + version: 0.1.0 + repository: file://charts/compute-plane + condition: compute-plane.enabled + - name: ingress + version: 0.1.0 + repository: file://charts/ingress + condition: ingress.enabled + - name: eniconfig + version: 0.1.0 + repository: file://charts/eniconfig + condition: eniconfig.enabled +### Armonik dependencies + - name: minio + version: 14.8.6 + repository: https://charts.bitnami.com/bitnami + condition: minio.enabled + - name: redis + version: 20.4.0 + repository: https://charts.bitnami.com/bitnami + condition: redis.enabled + - name: activemq-artemis + version: 1.0.1 + repository: https://kahootali.github.io/activemq-artemis-helm/ + condition: activemq.enabled + - name: mongodb + version: 16.3.2 + repository: https://charts.bitnami.com/bitnami + condition: mongodb.enabled + - name: mongodb-sharded + version: 9.0.3 + repository: https://charts.bitnami.com/bitnami + condition: mongodb-sharded.enabled + - name: prometheus + version: 1.3.29 + repository: https://charts.bitnami.com/bitnami + condition: prometheus.enabled + - name: rabbitmq + version: 15.1.0 + repository: https://charts.bitnami.com/bitnami + condition: rabbitmq.enabled + - name: keda + version: 2.16.1 + repository: https://kedacore.github.io/charts + condition: keda.enabled + - name: metrics-server + version: 3.12.2 + repository: https://kubernetes-sigs.github.io/metrics-server/ + condition: metrics-server.enabled + - name: cluster-autoscaler + version: 9.43.2 + repository: https://kubernetes.github.io/autoscaler + condition: cluster-autoscaler.enabled + - name: aws-node-termination-handler + version: 0.21.0 + repository: https://aws.github.io/eks-charts + condition: termination-handler.enabled + - name: aws-efs-csi-driver + version: 3.1.3 + repository: https://kubernetes-sigs.github.io/aws-efs-csi-driver/ + condition: efs-csi-driver.enabled + - name: chaos-mesh + version: 2.6.3 + repository: https://charts.chaos-mesh.org + condition: chaos-mesh.enabled + + diff --git a/charts/armonik/README.md b/charts/armonik/README.md new file mode 100644 index 000000000..436def88a --- /dev/null +++ b/charts/armonik/README.md @@ -0,0 +1,104 @@ +# armonik + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.2](https://img.shields.io/badge/AppVersion-0.2.2-informational?style=flat-square) + +A Helm chart for Armonik + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| Aneo | | | + +## Requirements + +Kubernetes: `>=v1.23.0-0` + +| Repository | Name | Version | +|------------|------|---------| +| | compute-plane | | +| | control-plane | | +| | ingress | | + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| computePlane.enabled | bool | `false` | | +| controlPlanConfigmapEnabled | bool | `false` | | +| controlPlanConfigmap[0] | string | `"control-plane-configmap"` | | +| controlPlanConfigmap[1] | string | `"log-configmap"` | | +| controlPlanConfigmap[2] | string | `"core-configmap"` | | +| controlPlane.enabled | bool | `true` | | +| coreConfigmap.data.Amqp__CaPath | string | `"/amqp/chain.pem"` | | +| coreConfigmap.data.Amqp__Scheme | string | `"AMQPS"` | | +| coreConfigmap.data.Authenticator__RequireAuthentication | bool | `false` | | +| coreConfigmap.data.Authenticator__RequireAuthorization | bool | `false` | | +| coreConfigmap.data.Components__ObjectStorage | string | `"Redis"` | | +| coreConfigmap.data.Components__QueueAdaptorSettings__AdapterAbsolutePath | string | `"/adapters/queue/amqp/ArmoniK.Core.Adapters.Amqp.dll"` | | +| coreConfigmap.data.Components__QueueAdaptorSettings__ClassName | string | `"ArmoniK.Core.Adapters.Amqp.QueueBuilder"` | | +| coreConfigmap.data.Components__QueueStorage | string | `"Amqp"` | | +| coreConfigmap.data.Components__TableStorage | string | `"MongoDB"` | | +| coreConfigmap.data.MongoDB__CAFile | string | `"/mongodb/chain.pem"` | | +| coreConfigmap.data.MongoDB__DatabaseName | string | `"database"` | | +| coreConfigmap.data.MongoDB__DirectConnection | string | `"false"` | | +| coreConfigmap.data.MongoDB__ReplicaSet | string | `"rs0"` | | +| coreConfigmap.data.MongoDB__Tls | string | `"true"` | | +| coreConfigmap.data.Redis__CaPath | string | `"/redis/chain.pem"` | | +| coreConfigmap.data.Redis__ClientName | string | `"ArmoniK.Core"` | | +| coreConfigmap.data.Redis__InstanceName | string | `"ArmoniKRedis"` | | +| coreConfigmap.data.Redis__Ssl | string | `"true"` | | +| coreConfigmap.enabled | bool | `false` | | +| coreConfigmap.metadata.name | string | `"core-configmap-helm"` | | +| extraConf.control.Submitter__MaxErrorAllowed | string | `"50"` | | +| extraConf.core.Amqp__AllowHostMismatch | bool | `true` | | +| extraConf.core.Amqp__MaxPriority | string | `"10"` | | +| extraConf.core.Amqp__MaxRetries | string | `"5"` | | +| extraConf.core.Amqp__QueueStorage__LockRefreshExtension | string | `"00:02:00"` | | +| extraConf.core.Amqp__QueueStorage__LockRefreshPeriodicity | string | `"00:00:45"` | | +| extraConf.core.Amqp__QueueStorage__PollPeriodicity | string | `"00:00:10"` | | +| extraConf.core.MongoDB__AllowInsecureTls | bool | `true` | | +| extraConf.core.MongoDB__DataRetention | string | `"1.00:00:00"` | | +| extraConf.core.MongoDB__TableStorage__PollingDelay | string | `"00:00:01"` | | +| extraConf.core.MongoDB__TableStorage__PollingDelayMax | string | `"00:00:10"` | | +| extraConf.core.MongoDB__TableStorage__PollingDelayMin | string | `"00:00:01"` | | +| extraConf.core.Redis__SslHost | string | `"127.0.0.1"` | | +| extraConf.core.Redis__Timeout | int | `30000` | | +| extraConf.core.Redis__TtlTimeSpan | string | `"1.00:00:00"` | | +| fullnameOverride | string | `""` | | +| global.namespace | string | `"armonik"` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.repository | string | `"nginx"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| logConfigmap.data.loggingLevel | string | `"Information"` | | +| logConfigmap.enabled | bool | `false` | | +| logConfigmap.metadata.name | string | `"log-configmap-helm"` | | +| logConfigmap.metadata.namespace | string | `"armonik"` | | +| nameOverride | string | `""` | | +| nodeSelector | object | `{}` | | +| partitionNames[0] | string | `"default"` | | +| partitionNames[1] | string | `"monitoring"` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| replicaCount | int | `1` | | +| securityContext | object | `{}` | | +| service.port | int | `80` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts | list | `[]` | | +| volumes | list | `[]` | | + diff --git a/charts/eniconfig/.helmignore b/charts/armonik/charts/compute-plane/.helmignore similarity index 93% rename from charts/eniconfig/.helmignore rename to charts/armonik/charts/compute-plane/.helmignore index 0e8a0eb36..f82e96d46 100644 --- a/charts/eniconfig/.helmignore +++ b/charts/armonik/charts/compute-plane/.helmignore @@ -1,23 +1,23 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/armonik/charts/compute-plane/Chart.yaml b/charts/armonik/charts/compute-plane/Chart.yaml new file mode 100644 index 000000000..d71ef73d0 --- /dev/null +++ b/charts/armonik/charts/compute-plane/Chart.yaml @@ -0,0 +1,18 @@ +apiVersion: v2 +appVersion: "0.2.2" +version: 0.1.0 +name: compute-plane +description: A Helm chart for Armonik +icon: https://25070129.fs1.hubspotusercontent-eu1.net/hubfs/25070129/Website/Images%20-%20Website/ArmoniK/logo_armonik_by_aneo%201.svg +kubeVersion: ">=v1.23.0-0" +keywords: + - armonik + - helm +type: application +home: https://github.com/aneoconsulting/ArmoniK +sources: + - https://aneoconsulting.github.io/ +maintainers: + - name: Aneo + email: armonik-support@aneo.fr + url: armonik.fr \ No newline at end of file diff --git a/charts/armonik/charts/compute-plane/README.md b/charts/armonik/charts/compute-plane/README.md new file mode 100644 index 000000000..7c4dae7f4 --- /dev/null +++ b/charts/armonik/charts/compute-plane/README.md @@ -0,0 +1,212 @@ +# compute-plane + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.2](https://img.shields.io/badge/AppVersion-0.2.2-informational?style=flat-square) + +A Helm chart for Armonik Compute Plane + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| Aneo | | | + +## Requirements + +Kubernetes: `>=v1.23.0-0` + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| FS.mountPath | string | `"/data"` | | +| FS.name | string | `"shared-volume"` | | +| certificates.activemq.mountPath | string | `"/amqp"` | | +| certificates.activemq.name | string | `"activemq-secret-volume"` | | +| certificates.activemq.secretName | string | `"activemq"` | | +| certificates.mongodb.mountPath | string | `"/mongodb"` | | +| certificates.mongodb.name | string | `"mongodb-secret-volume"` | | +| certificates.mongodb.secretName | string | `"mongodb"` | | +| certificates.redis.mountPath | string | `"/redis"` | | +| certificates.redis.name | string | `"redis-secret-volume"` | | +| certificates.redis.secretName | string | `"redis"` | | +| checkFileStorageType | string | `"FS"` | | +| computePlane.metadata.labels.app | string | `"armonik"` | | +| computePlane.metadata.labels.service | string | `"compute-plane"` | | +| computePlane.partition.bench.hpa.behavior.period_seconds | int | `15` | | +| computePlane.partition.bench.hpa.behavior.restoreToOriginalReplicaCount | bool | `true` | | +| computePlane.partition.bench.hpa.behavior.stabilizationWindowSeconds | int | `300` | | +| computePlane.partition.bench.hpa.behavior.type | string | `"Percent"` | | +| computePlane.partition.bench.hpa.behavior.value | int | `100` | | +| computePlane.partition.bench.hpa.cooldownPeriod | int | `300` | | +| computePlane.partition.bench.hpa.maxReplicaCount | int | `5` | | +| computePlane.partition.bench.hpa.minReplicaCount | int | `0` | | +| computePlane.partition.bench.hpa.pollingInterval | int | `15` | | +| computePlane.partition.bench.hpa.triggers[0].threshold | int | `2` | | +| computePlane.partition.bench.hpa.triggers[0].type | string | `"prometheus"` | | +| computePlane.partition.bench.hpa.type | string | `"prometheus"` | | +| computePlane.partition.bench.pollingAgent.image | string | `"dockerhubaneo/armonik_core_bench_test_client"` | | +| computePlane.partition.bench.pollingAgent.limits.cpu | string | `"2000m"` | | +| computePlane.partition.bench.pollingAgent.limits.memory | string | `"2048Mi"` | | +| computePlane.partition.bench.pollingAgent.requests.cpu | string | `"50m"` | | +| computePlane.partition.bench.pollingAgent.requests.memory | string | `"50Mi"` | | +| computePlane.partition.bench.replicas | int | `0` | | +| computePlane.partition.bench.worker[0].image | string | `"dockerhubaneo/armonik_core_bench_test_worker"` | | +| computePlane.partition.bench.worker[0].limits.cpu | string | `"1000m"` | | +| computePlane.partition.bench.worker[0].limits.memory | string | `"1024Mi"` | | +| computePlane.partition.bench.worker[0].name | string | `"bench-worker"` | | +| computePlane.partition.bench.worker[0].requests.cpu | string | `"50m"` | | +| computePlane.partition.bench.worker[0].requests.memory | string | `"50Mi"` | | +| computePlane.partition.default.hpa.behavior.period_seconds | int | `15` | | +| computePlane.partition.default.hpa.behavior.restore_to_original_replica_count | bool | `true` | | +| computePlane.partition.default.hpa.behavior.stabilization_window_seconds | int | `300` | | +| computePlane.partition.default.hpa.behavior.type | string | `"Percent"` | | +| computePlane.partition.default.hpa.behavior.value | int | `100` | | +| computePlane.partition.default.hpa.cooldown_period | int | `300` | | +| computePlane.partition.default.hpa.max_replica_count | int | `5` | | +| computePlane.partition.default.hpa.min_replica_count | int | `0` | | +| computePlane.partition.default.hpa.polling_interval | int | `15` | | +| computePlane.partition.default.hpa.triggers[0].threshold | int | `2` | | +| computePlane.partition.default.hpa.triggers[0].type | string | `"prometheus"` | | +| computePlane.partition.default.hpa.type | string | `"prometheus"` | | +| computePlane.partition.default.pollingAgent.image | string | `"dockerhubaneo/armonik_pollingagent"` | | +| computePlane.partition.default.pollingAgent.limits.cpu | string | `"2000m"` | | +| computePlane.partition.default.pollingAgent.limits.memory | string | `"2048Mi"` | | +| computePlane.partition.default.pollingAgent.requests.cpu | string | `"50m"` | | +| computePlane.partition.default.pollingAgent.requests.memory | string | `"50Mi"` | | +| computePlane.partition.default.replicas | int | `0` | | +| computePlane.partition.default.worker[0].image | string | `"dockerhubaneo/armonik_worker_dll"` | | +| computePlane.partition.default.worker[0].imagePullPolicy | string | `"IfNotPresent"` | | +| computePlane.partition.default.worker[0].limits.cpu | string | `"1000m"` | | +| computePlane.partition.default.worker[0].limits.memory | string | `"1024Mi"` | | +| computePlane.partition.default.worker[0].name | string | `"default-worker"` | | +| computePlane.partition.default.worker[0].requests.cpu | string | `"50m"` | | +| computePlane.partition.default.worker[0].requests.memory | string | `"50Mi"` | | +| computePlane.partition.htcmock.hpa.behavior.periodSeconds | int | `15` | | +| computePlane.partition.htcmock.hpa.behavior.restoreToOriginalReplicaCount | bool | `true` | | +| computePlane.partition.htcmock.hpa.behavior.stabilizationWindowSeconds | int | `300` | | +| computePlane.partition.htcmock.hpa.behavior.type | string | `"Percent"` | | +| computePlane.partition.htcmock.hpa.behavior.value | int | `100` | | +| computePlane.partition.htcmock.hpa.cooldownPeriod | int | `300` | | +| computePlane.partition.htcmock.hpa.maxReplicaCount | int | `5` | | +| computePlane.partition.htcmock.hpa.minReplicaCount | int | `0` | | +| computePlane.partition.htcmock.hpa.pollingInterval | int | `15` | | +| computePlane.partition.htcmock.hpa.triggers[0].threshold | int | `2` | | +| computePlane.partition.htcmock.hpa.triggers[0].type | string | `"prometheus"` | | +| computePlane.partition.htcmock.hpa.type | string | `"prometheus"` | | +| computePlane.partition.htcmock.pollingAgent.image | string | `"dockerhubaneo/armonik_core_htcmock_test_client"` | | +| computePlane.partition.htcmock.pollingAgent.limits.cpu | string | `"2000m"` | | +| computePlane.partition.htcmock.pollingAgent.limits.memory | string | `"2048Mi"` | | +| computePlane.partition.htcmock.pollingAgent.requests.cpu | string | `"50m"` | | +| computePlane.partition.htcmock.pollingAgent.requests.memory | string | `"50Mi"` | | +| computePlane.partition.htcmock.replicas | int | `0` | | +| computePlane.partition.htcmock.worker[0].image | string | `"dockerhubaneo/armonik_core_htcmock_test_worker"` | | +| computePlane.partition.htcmock.worker[0].limits.cpu | string | `"1000m"` | | +| computePlane.partition.htcmock.worker[0].limits.memory | string | `"1024Mi"` | | +| computePlane.partition.htcmock.worker[0].name | string | `"htcmock-worker"` | | +| computePlane.partition.htcmock.worker[0].requests.cpu | string | `"50m"` | | +| computePlane.partition.htcmock.worker[0].requests.memory | string | `"50Mi"` | | +| computePlane.partition.stream.hpa.behavior.period_seconds | int | `15` | | +| computePlane.partition.stream.hpa.behavior.restoreToOriginalReplicaCount | bool | `true` | | +| computePlane.partition.stream.hpa.behavior.stabilizationWindowSeconds | int | `300` | | +| computePlane.partition.stream.hpa.behavior.type | string | `"Percent"` | | +| computePlane.partition.stream.hpa.behavior.value | int | `100` | | +| computePlane.partition.stream.hpa.cooldown_period | int | `300` | | +| computePlane.partition.stream.hpa.maxReplicaCount | int | `5` | | +| computePlane.partition.stream.hpa.minReplicaCount | int | `0` | | +| computePlane.partition.stream.hpa.polling_interval | int | `15` | | +| computePlane.partition.stream.hpa.triggers[0].threshold | int | `2` | | +| computePlane.partition.stream.hpa.triggers[0].type | string | `"prometheus"` | | +| computePlane.partition.stream.hpa.type | string | `"prometheus"` | | +| computePlane.partition.stream.pollingAgent.image | string | `"dockerhubaneo/armonik_core_stream_test_client"` | | +| computePlane.partition.stream.pollingAgent.limits.cpu | string | `"2000m"` | | +| computePlane.partition.stream.pollingAgent.limits.memory | string | `"2048Mi"` | | +| computePlane.partition.stream.pollingAgent.requests.cpu | string | `"50m"` | | +| computePlane.partition.stream.pollingAgent.requests.memory | string | `"50Mi"` | | +| computePlane.partition.stream.replicas | int | `0` | | +| computePlane.partition.stream.worker[0].image | string | `"dockerhubaneo/armonik_core_stream_test_worker"` | | +| computePlane.partition.stream.worker[0].limits.cpu | string | `"1000m"` | | +| computePlane.partition.stream.worker[0].limits.memory | string | `"1024Mi"` | | +| computePlane.partition.stream.worker[0].name | string | `"stream-worker"` | | +| computePlane.partition.stream.worker[0].requests.cpu | string | `"50m"` | | +| computePlane.partition.stream.worker[0].requests.memory | string | `"50Mi"` | | +| credentials.Amqp__Host.key | string | `"host"` | | +| credentials.Amqp__Host.name | string | `"activemq"` | | +| credentials.Amqp__Password.key | string | `"password"` | | +| credentials.Amqp__Password.name | string | `"activemq"` | | +| credentials.Amqp__Port.key | string | `"port"` | | +| credentials.Amqp__Port.name | string | `"activemq"` | | +| credentials.Amqp__User.key | string | `"username"` | | +| credentials.Amqp__User.name | string | `"activemq"` | | +| credentials.MongoDB__Host.key | string | `"host"` | | +| credentials.MongoDB__Host.name | string | `"mongodb"` | | +| credentials.MongoDB__Password.key | string | `"password"` | | +| credentials.MongoDB__Password.name | string | `"mongodb"` | | +| credentials.MongoDB__Port.key | string | `"port"` | | +| credentials.MongoDB__Port.name | string | `"mongodb"` | | +| credentials.MongoDB__User.key | string | `"username"` | | +| credentials.MongoDB__User.name | string | `"mongodb"` | | +| credentials.Redis__EndpointUrl.key | string | `"url"` | | +| credentials.Redis__EndpointUrl.name | string | `"redis"` | | +| credentials.Redis__Password.key | string | `"password"` | | +| credentials.Redis__Password.name | string | `"redis"` | | +| credentials.Redis__User.key | string | `"username"` | | +| credentials.Redis__User.name | string | `"redis"` | | +| extraConf.compute | object | `{}` | | +| extraConf.control | object | `{}` | | +| extraConf.core | object | `{}` | | +| extraConf.log | object | `{}` | | +| extraConf.polling | object | `{}` | | +| extraConf.worker | object | `{}` | | +| fileStorageEndpoints.s3Storage.AccessKeyId | object | `{}` | | +| fileStorageEndpoints.s3Storage.BucketName | object | `{}` | | +| fileStorageEndpoints.s3Storage.MustForcePathStyle | object | `{}` | | +| fileStorageEndpoints.s3Storage.SecretAccessKey | object | `{}` | | +| fileStorageEndpoints.s3Storage.ServiceURL | object | `{}` | | +| fileStorageEndpoints.s3Storage.UseChecksum | object | `{}` | | +| fileStorageEndpoints.s3Storage.UseChunkEncoding | object | `{}` | | +| fileStorageType | string | `"nfs"` | | +| hostPath.name | string | `"shared-volume"` | | +| hostPath.path | string | `"/data"` | | +| nameOverride | string | `"armonik-compute-plane"` | | +| namespace | string | `"armonik"` | namespace is the namespace used for all resources | +| nfs.name | string | `"shared-volume"` | | +| nfs.path | string | `"/data"` | | +| nfs.server | string | `"test"` | | +| pollingAgent.image | string | `nil` | | +| pollingAgent.imagePullPolicy | string | `nil` | | +| pollingAgent.livenessProbe.failureThreshold | int | `3` | | +| pollingAgent.livenessProbe.httpGet.path | string | `"/liveness"` | | +| pollingAgent.livenessProbe.httpGet.port | int | `1080` | | +| pollingAgent.livenessProbe.initialDelaySeconds | int | `15` | | +| pollingAgent.livenessProbe.periodSeconds | int | `10` | | +| pollingAgent.livenessProbe.successThreshold | int | `1` | | +| pollingAgent.livenessProbe.timeoutSeconds | int | `10` | | +| pollingAgent.name | string | `"polling-agent"` | | +| pollingAgent.ports.containerPort | int | `1080` | | +| pollingAgent.ports.name | string | `"poll-agent-port"` | | +| pollingAgent.startupProbe.failureThreshold | int | `20` | | +| pollingAgent.startupProbe.httpGet.path | string | `"/startup"` | | +| pollingAgent.startupProbe.httpGet.port | int | `1080` | | +| pollingAgent.startupProbe.initialDelaySeconds | int | `1` | | +| pollingAgent.startupProbe.periodSeconds | int | `3` | | +| pollingAgent.startupProbe.successThreshold | int | `1` | | +| pollingAgent.startupProbe.timeoutSeconds | int | `1` | | +| pollingAgent.workerCheckDelay | string | `"00:00:10"` | | +| pollingAgent.workerCheckRetries | string | `"10"` | | +| pollingAgentConfigmaps[0] | string | `"log-configmap"` | | +| pollingAgentConfigmaps[1] | string | `"polling-agent-configmap"` | | +| pollingAgentConfigmaps[2] | string | `"core-configmap"` | | +| pollingAgentConfigmaps[3] | string | `"compute-plane-configmap"` | | +| preStopWaitScript | string | `"<=v1.23.0-0" +keywords: + - armonik + - helm +type: application +home: https://github.com/aneoconsulting/ArmoniK +sources: + - https://aneoconsulting.github.io/ +maintainers: + - name: Aneo + email: armonik-support@aneo.fr + url: armonik.fr \ No newline at end of file diff --git a/charts/armonik/charts/control-plane/README.md b/charts/armonik/charts/control-plane/README.md new file mode 100644 index 000000000..426941288 --- /dev/null +++ b/charts/armonik/charts/control-plane/README.md @@ -0,0 +1,157 @@ +# control-plane + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.2](https://img.shields.io/badge/AppVersion-0.2.2-informational?style=flat-square) + +A Helm chart for ArmoniK Control Plane + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| Aneo | | | + +## Requirements + +Kubernetes: `>=v1.23.0-0` + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| annotations | object | `{"key1":"val1"}` | control plane annotations | +| certificates.activemq.mountPath | string | `"/amqp"` | | +| certificates.activemq.name | string | `"activemq-secret-volume"` | | +| certificates.activemq.secretName | string | `"activemq"` | | +| certificates.mongodb.mountPath | string | `"/mongodb"` | | +| certificates.mongodb.name | string | `"mongodb-secret-volume"` | | +| certificates.mongodb.secretName | string | `"mongodb"` | | +| certificates.redis.mountPath | string | `"/redis"` | | +| certificates.redis.name | string | `"redis-secret-volume"` | | +| certificates.redis.secretName | string | `"redis"` | | +| configmaps[0] | string | `"control-plane-configmap"` | | +| configmaps[1] | string | `"log-configmap"` | | +| configmaps[2] | string | `"core-configmap"` | | +| containerPort | int | `1080` | | +| controlPlanConfigmap.enabled | bool | `true` | | +| controlPlaneSelector | list | `[]` | | +| coreConfigmap.data.Amqp__CaPath | string | `"/amqp/chain.pem"` | | +| coreConfigmap.data.Amqp__Scheme | string | `"AMQPS"` | | +| coreConfigmap.data.Authenticator__RequireAuthentication | bool | `false` | | +| coreConfigmap.data.Authenticator__RequireAuthorization | bool | `false` | | +| coreConfigmap.data.Components__ObjectStorage | string | `"Redis"` | | +| coreConfigmap.data.Components__QueueAdaptorSettings__AdapterAbsolutePath | string | `"/adapters/queue/amqp/ArmoniK.Core.Adapters.Amqp.dll"` | | +| coreConfigmap.data.Components__QueueAdaptorSettings__ClassName | string | `"ArmoniK.Core.Adapters.Amqp.QueueBuilder"` | | +| coreConfigmap.data.Components__QueueStorage | string | `"Amqp"` | | +| coreConfigmap.data.Components__TableStorage | string | `"MongoDB"` | | +| coreConfigmap.data.MongoDB__CAFile | string | `"/mongodb/chain.pem"` | | +| coreConfigmap.data.MongoDB__DatabaseName | string | `"database"` | | +| coreConfigmap.data.MongoDB__DirectConnection | string | `"false"` | | +| coreConfigmap.data.MongoDB__ReplicaSet | string | `"rs0"` | | +| coreConfigmap.data.MongoDB__Tls | string | `"true"` | | +| coreConfigmap.data.Redis__CaPath | string | `"/redis/chain.pem"` | | +| coreConfigmap.data.Redis__ClientName | string | `"ArmoniK.Core"` | | +| coreConfigmap.data.Redis__InstanceName | string | `"ArmoniKRedis"` | | +| coreConfigmap.data.Redis__Ssl | string | `"true"` | | +| coreConfigmap.enabled | bool | `true` | | +| coreConfigmap.metadata.name | string | `"core-configmap-helm"` | | +| credentials.Amqp__Host.key | string | `"host"` | | +| credentials.Amqp__Host.name | string | `"activemq"` | | +| credentials.Amqp__Password.key | string | `"password"` | | +| credentials.Amqp__Password.name | string | `"activemq"` | | +| credentials.Amqp__Port.key | string | `"port"` | | +| credentials.Amqp__Port.name | string | `"activemq"` | | +| credentials.Amqp__User | object | `{"key":"username","name":"activemq"}` | activemq | +| credentials.MongoDB__Host.key | string | `"host"` | | +| credentials.MongoDB__Host.name | string | `"mongodb"` | | +| credentials.MongoDB__Password.key | string | `"password"` | | +| credentials.MongoDB__Password.name | string | `"mongodb"` | | +| credentials.MongoDB__Port.key | string | `"port"` | | +| credentials.MongoDB__Port.name | string | `"mongodb"` | | +| credentials.MongoDB__User | object | `{"key":"username","name":"mongodb"}` | mongodb | +| credentials.Redis__EndpointUrl.key | string | `"url"` | | +| credentials.Redis__EndpointUrl.name | string | `"redis"` | | +| credentials.Redis__Password.key | string | `"password"` | | +| credentials.Redis__Password.name | string | `"redis"` | | +| credentials.Redis__User | object | `{"key":"username","name":"redis"}` | redis | +| defaultPartition | string | `"default"` | | +| extraConf.control.Submitter__MaxErrorAllowed | string | `"50"` | | +| extraConf.core.Amqp__AllowHostMismatch | bool | `true` | | +| extraConf.core.Amqp__MaxPriority | string | `"10"` | | +| extraConf.core.Amqp__MaxRetries | string | `"5"` | | +| extraConf.core.Amqp__QueueStorage__LockRefreshExtension | string | `"00:02:00"` | | +| extraConf.core.Amqp__QueueStorage__LockRefreshPeriodicity | string | `"00:00:45"` | | +| extraConf.core.Amqp__QueueStorage__PollPeriodicity | string | `"00:00:10"` | | +| extraConf.core.MongoDB__AllowInsecureTls | bool | `true` | | +| extraConf.core.MongoDB__DataRetention | string | `"1.00:00:00"` | | +| extraConf.core.MongoDB__TableStorage__PollingDelay | string | `"00:00:01"` | | +| extraConf.core.MongoDB__TableStorage__PollingDelayMax | string | `"00:00:10"` | | +| extraConf.core.MongoDB__TableStorage__PollingDelayMin | string | `"00:00:01"` | | +| extraConf.core.Redis__SslHost | string | `"127.0.0.1"` | | +| extraConf.core.Redis__Timeout | int | `30000` | | +| extraConf.core.Redis__TtlTimeSpan | string | `"1.00:00:00"` | | +| image | string | `"dockerhubaneo/armonik_control:0.19.3"` | image is the armonik control plane image and the tag image:tag | +| imageInfo | object | `{"pullPolicy":"IfNotPresent","pullSecrets":"","registry":"docker.io","repository":"dockerhubaneo/armonik_control","tag":"0.19.3"}` | image | +| labelsApp | string | `"armonik"` | | +| labelsService | string | `"control-plane-helm"` | | +| livenessProbe.failureThreshold | int | `1` | | +| livenessProbe.httpGet.path | string | `"/liveness"` | | +| livenessProbe.httpGet.port | int | `1081` | | +| livenessProbe.initialDelaySeconds | int | `15` | | +| livenessProbe.periodSeconds | int | `5` | | +| livenessProbe.successThreshold | int | `1` | | +| livenessProbe.timeoutSeconds | int | `1` | | +| logConfigmap.data.loggingLevel | string | `"Information"` | | +| logConfigmap.enabled | bool | `true` | | +| logConfigmap.metadata.name | string | `"log-configmap-helm"` | | +| logConfigmap.metadata.namespace | string | `"armonik"` | | +| name | string | `"control-plane-helm"` | controlPlane contains all the values of the control plane deployment | +| nameOverride | string | `""` | | +| namePort | string | `"http"` | deployment port name and containerPort | +| namespace | string | `"armonik"` | namespace is the namespace used for all resources | +| nodeSelector | list | `[]` | control plane node selector | +| partitionNames[0] | string | `"default"` | | +| partitionNames[1] | string | `"monitoring"` | | +| port | int | `5001` | | +| protocol | string | `"TCP"` | | +| replicaCount | int | `1` | replicaCount is the number of replicas | +| resources.limits.cpu | string | `"1000m"` | | +| resources.limits.memory | string | `"2048Mi"` | | +| resources.requests.cpu | string | `"50m"` | | +| resources.requests.memory | string | `"50Mi"` | | +| restartPolicy | string | `"Always"` | restart policy | +| secrets.activemq.caFileName | string | `"/amqp/chain.pem"` | | +| secrets.activemq.name | string | `"activemq"` | | +| secrets.deployedObjectStorageSecret | string | `"deployed-object-storage-helm"` | | +| secrets.deployedQueueStorageSecret | string | `"deployed-queue-storage-helm"` | | +| secrets.deployedTableStorageSecret | string | `"deployed-table-storage-helm"` | | +| secrets.fluentBit | string | `"fluent-bit"` | | +| secrets.grafana | string | `"grafana"` | | +| secrets.metricsExporter | string | `"metrics-exporter"` | | +| secrets.mongodb.caFileName | string | `"/mongodb/chain.pem"` | | +| secrets.mongodb.name | string | `"mongodb"` | | +| secrets.partitionMetrics_exporter | string | `"partition-metrics-exporter"` | | +| secrets.prometheus | string | `"prometheus"` | | +| secrets.redis.caFileName | string | `"/redis/chain.pem"` | | +| secrets.redis.name | string | `"redis"` | | +| secrets.s3 | string | `"s3"` | | +| secrets.seq | string | `"seq"` | | +| secrets.sharedStorage.fileServerIp | string | `""` | | +| secrets.sharedStorage.fileStorageType | string | `"HostPath"` | | +| secrets.sharedStorage.hostPath | string | `"data"` | | +| secrets.sharedStorage.name | string | `"shared-storage-helm"` | | +| secrets.storageEndpointUrl.deployedObjectStorages[0] | string | `"Redis"` | | +| secrets.storageEndpointUrl.deployedQueueStorages[0] | string | `"Amqp"` | | +| secrets.storageEndpointUrl.deployedTableStorages[0] | string | `"MongoDB"` | | +| secrets.storageEndpointUrl.objectStorageAdapter | string | `"Redis"` | | +| secrets.storageEndpointUrl.queueStorageAdapter | string | `"Amqp"` | | +| secrets.storageEndpointUrl.tableStorageAdapter | string | `"MongoDB"` | | +| serviceAccountName | string | `""` | | +| serviceType | string | `"ClusterIP"` | service type and port and protocol | +| startupProbe.failureThreshold | int | `20` | | +| startupProbe.httpGet.path | string | `"/startup"` | | +| startupProbe.httpGet.port | int | `1081` | | +| startupProbe.initialDelaySeconds | int | `1` | | +| startupProbe.periodSeconds | int | `3` | | +| startupProbe.successThreshold | int | `1` | | +| startupProbe.timeoutSeconds | int | `1` | | + diff --git a/charts/armonik/charts/control-plane/templates/NOTES.txt b/charts/armonik/charts/control-plane/templates/NOTES.txt new file mode 100644 index 000000000..e2b04888c --- /dev/null +++ b/charts/armonik/charts/control-plane/templates/NOTES.txt @@ -0,0 +1,6 @@ +Thank you for support {{ .Chart.Name }}. +Your release is named {{ .Release.Name }}. +To learn more about the release, try: + $ helm status {{ .Release.Name }} + $ helm get all {{ .Release.Name }} + $ helm uninstall {{ .Release.Name }} diff --git a/charts/armonik/charts/control-plane/templates/_helpers.tpl b/charts/armonik/charts/control-plane/templates/_helpers.tpl new file mode 100644 index 000000000..a1418af5a --- /dev/null +++ b/charts/armonik/charts/control-plane/templates/_helpers.tpl @@ -0,0 +1,65 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "control-plane.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "control-plane.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "control-plane.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "control-plane.labels" -}} +helm.sh/chart: {{ include "control-plane.chart" . }} +{{ include "control-plane.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- with .Values.extraLabels }} +{{ toYaml . }} +{{- end }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "control-plane.selectorLabels" -}} +app.kubernetes.io/name: {{ include "control-plane.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "control-plane.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "control-plane.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/armonik/charts/control-plane/templates/control-plane-configmap.yaml b/charts/armonik/charts/control-plane/templates/control-plane-configmap.yaml new file mode 100644 index 000000000..ffbc9c614 --- /dev/null +++ b/charts/armonik/charts/control-plane/templates/control-plane-configmap.yaml @@ -0,0 +1,18 @@ +{{ if .Values.controlPlanConfigmap.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ first .Values.configmaps }} + namespace: {{ .Values.namespace }} +data: +{{ if or (not .Values.defaultPartition) (eq .Values.defaultPartition "") (not (has .Values.defaultPartition .Values.partitionNames ))}} + {{ if gt (len .Values.partitionNames) 0 }} + Submitter__DefaultPartition: {{ first .Values.partitionNames }} + {{ else }} + Submitter__DefaultPartition: "" + {{ end }} +{{ else }} + Submitter__DefaultPartition: {{ .Values.defaultPartition }} +{{ end}} +{{ toYaml .Values.extraConf.control | indent 2 }} +{{ end }} diff --git a/charts/armonik/charts/control-plane/templates/control-plane-deployment.yaml b/charts/armonik/charts/control-plane/templates/control-plane-deployment.yaml new file mode 100644 index 000000000..57d4fe9d0 --- /dev/null +++ b/charts/armonik/charts/control-plane/templates/control-plane-deployment.yaml @@ -0,0 +1,117 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Values.name | default "control-plane" | quote }} +{{- if .Values.global }} # use the global value if it is set + namespace: {{ .Values.global.namespace }} +{{- else }} # else use local value + namespace: {{ .Values.namespace }} +{{- end }} + labels: +{{ include "control-plane.labels" . | indent 4 }} + app: {{ .Values.labelsApp | default "armonik" | quote }} + service: {{ .Values.labelsService | default "control-plane" | quote }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ .Values.labelsApp | default "armonik" | quote }} + service: {{ .Values.labelsService | default "control-plane" | quote }} + template: + metadata: + name: {{ .Values.name }} + {{- if .Values.global }} # use the global value if it is set + namespace: {{ .Values.global.namespace }} + {{- else }} # else use local value + namespace: {{ .Values.namespace }} + {{- end }} + labels: + app: {{ .Values.labelsApp | default "armonik" | quote }} + service: {{ .Values.labelsService | default "control-plane" | quote }} + annotations: + {{- range $key, $value := .Values.annotations }} ## use it for labels + {{ $key }}: {{ $value }} + {{- end }} + spec: + nodeSelector: + {{- range $i, $value := .Values.nodeSelector }} + {{ $value.key }}: {{ $value.value }} + {{- end }} + tolerations: + {{- range $i, $value := .Values.nodeSelector }} + - key: {{ $value.key | quote }} + value: {{ $value.value | quote }} + operator: "Equal" + effect: "NoSchedule" + {{- end }} + {{- if (ne .Values.imageInfo.pullSecrets "") }} + imagePullSecrets: + name: {{ .Values.imageInfo.pullSecrets }} + {{- end }} + restartPolicy: {{ .Values.restartPolicy | default "Always" | quote }} + serviceAccountName: {{ .Values.serviceAccountName }} + containers: + - name: {{ .Values.name }} + image: {{ .Values.image }} + imagePullPolicy: {{ .Values.imageInfo.pullPolicy }} + resources: + limits: + cpu: {{ .Values.resources.limits.cpu }} + memory: {{ .Values.resources.limits.memory }} + requests: + cpu: {{ .Values.resources.requests.cpu }} + memory: {{ .Values.resources.requests.memory }} + ports: + - name: {{ .Values.namePort }} + containerPort: {{ .Values.containerPort }} + livenessProbe: + {{/* it would be better to use toYaml but it unquote strings + {{ toYaml .Values.livenessProbe | nindent 12 }} + */}} + httpGet: + path: {{ .Values.livenessProbe.httpGet.path | quote }} + port: {{ .Values.livenessProbe.httpGet.port }} + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.livenessProbe.periodSeconds }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} + successThreshold: {{ .Values.livenessProbe.successThreshold }} + failureThreshold: {{ .Values.livenessProbe.failureThreshold }} + startupProbe: + {{/* it would be better to use toYaml but it unquote strings + {{- toYaml .Values.startupProbe | nindent 12 }} + */}} + httpGet: + path: {{ .Values.startupProbe.httpGet.path | quote }} + port: {{ .Values.startupProbe.httpGet.port }} + initialDelaySeconds: {{ .Values.startupProbe.initialDelaySeconds }} + periodSeconds: {{ .Values.startupProbe.periodSeconds }} + timeoutSeconds: {{ .Values.startupProbe.timeoutSeconds }} + successThreshold: {{ .Values.startupProbe.successThreshold }} + failureThreshold: {{ .Values.startupProbe.failureThreshold }} + envFrom: + {{- range $i, $value := .Values.configmaps }} + - configMapRef: + name: {{ $value }} + {{- end }} + env: + {{- range $name, $value := .Values.credentials }} + - name: {{ $name | quote }} + valueFrom: + secretKeyRef: + key: {{ $value.key | quote }} + name: {{ $value.name | quote }} + optional: false + {{- end }} + volumeMounts: + {{- range $i, $value := .Values.certificates }} + - mountPath: {{ $value.mountPath | quote }} + name: {{ $value.name | quote }} + readOnly: true + {{- end }} + volumes: + {{- range $i, $value := .Values.certificates }} + - name: {{ $value.name | quote }} + secret: + secretName: {{ $value.secretName | quote }} + optional: false + {{- end }} diff --git a/charts/armonik/charts/control-plane/templates/control-plane-secrets.yaml b/charts/armonik/charts/control-plane/templates/control-plane-secrets.yaml new file mode 100644 index 000000000..180a5b3a5 --- /dev/null +++ b/charts/armonik/charts/control-plane/templates/control-plane-secrets.yaml @@ -0,0 +1,72 @@ +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.secrets.deployedObjectStorageSecret }} + namespace: {{ .Values.namespace }} +data: + list: {{ join "," .Values.secrets.storageEndpointUrl.deployedObjectStorages }} + adapter: {{ .Values.secrets.storageEndpointUrl.objectStorageAdapter | quote }} + +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.secrets.deployedTableStorageSecret }} + namespace: {{ .Values.namespace }} +data: + list: {{ join "," .Values.secrets.storageEndpointUrl.deployedTableStorages }} + adapter: {{ .Values.secrets.storageEndpointUrl.tableStorageAdapter | quote }} + +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.secrets.deployedQueueStorageSecret | quote }} + namespace: {{ .Values.namespace | quote }} +data: + list: {{ join "," .Values.secrets.storageEndpointUrl.deployedQueueStorages | quote }} + adapter: {{ .Values.secrets.storageEndpointUrl.queueStorageAdapter | quote }} + adapter_class_name: {{ .Values.coreConfigmap.data.Components__QueueAdaptorSettings__ClassName | quote }} + adapter_absolute_path: {{ .Values.coreConfigmap.data.Components__QueueAdaptorSettings__AdapterAbsolutePath | quote }} + + +apiVersion: v1 +kind: Secret +metadata: + name: {{ .Values.secrets.sharedStorage.name }} + namespace: {{ .Values.namespace }} +data: + host_path: {{ .Values.secrets.sharedStorage.hostPath }} + file_storage_type: {{ .Values.secrets.sharedStorage.fileStorageType }} + file_server_ip: {{ .Values.secrets.sharedStorage.fileServerIp }} + +{{/* + +# apiVersion: v1 +# kind: Secret +# metadata: +# name: {{ .Values.secrets.metricsExporter }} +# namespace: {{ .Values.namespace }} + +# apiVersion: v1 +# kind: Secret +# metadata: +# name: {{ .Values.secrets.fluentBit }} +# namespace: {{ .Values.namespace }} + +# apiVersion: v1 +# kind: Secret +# metadata: +# name: {{ .Values.secrets.seq }} +# namespace: {{ .Values.namespace }} + +# apiVersion: v1 +# kind: Secret +# metadata: +# name: {{ .Values.secrets.grafana }} +# namespace: {{ .Values.namespace }} + +# apiVersion: v1 +# kind: Secret +# metadata: +# name: {{ .Values.secrets.prometheus }} +# namespace: {{ .Values.namespace }} +*/}} diff --git a/charts/armonik/charts/control-plane/templates/control-plane-service.yaml b/charts/armonik/charts/control-plane/templates/control-plane-service.yaml new file mode 100644 index 000000000..a7e1a596d --- /dev/null +++ b/charts/armonik/charts/control-plane/templates/control-plane-service.yaml @@ -0,0 +1,33 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Values.name }} + namespace: {{ .Values.namespace }} + labels: +{{ include "control-plane.labels" . | indent 4 }} + app: {{ .Values.labelsApp | default "armonik" | quote }} + service: {{ .Values.labelsService | default "control-plane" | quote }} + annotations: + {{- range $key, $value := .Values.annotations }} + {{ $key }}: {{ $value }} + {{- end }} +spec: +{{ if eq .Values.serviceType "HeadLess" }} + type: "ClusterIP" + clusterIP: "None" +{{ else }} + type: {{ .Values.serviceType }} + clusterIP: null +{{ end }} + selector: + app: {{ .Values.labelsApp | default "armonik" | quote }} + service: {{ .Values.labelsService | default "control-plane" | quote }} + ports: + - name: {{ .Values.namePort }} + {{ if (eq .Values.serviceType "HeadLess") }} + port: {{ .Values.containerPort }} + {{ else }} + port: {{ .Values.port }} + {{ end }} + targetPort: {{ .Values.containerPort }} + protocol: "TCP" \ No newline at end of file diff --git a/charts/armonik/charts/control-plane/templates/core-configmap.yaml b/charts/armonik/charts/control-plane/templates/core-configmap.yaml new file mode 100644 index 000000000..634ef6c20 --- /dev/null +++ b/charts/armonik/charts/control-plane/templates/core-configmap.yaml @@ -0,0 +1,16 @@ +{{ if not .Values.global }} +{{ if .Values.coreConfigmap.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Values.coreConfigmap.metadata.name }} + namespace: {{ .Values.namespace }} +data: + {{- range $i, $value := .Values.coreConfigmap.data }} + {{ $i }}: {{ $value | quote }} + {{- end }} + {{- range $i, $value := .Values.extraConf.core }} + {{ $i }}: {{ $value | quote }} + {{- end }} +{{ end }} +{{ end }} diff --git a/charts/armonik/charts/control-plane/templates/log-configmap.yaml b/charts/armonik/charts/control-plane/templates/log-configmap.yaml new file mode 100644 index 000000000..7a8059a2c --- /dev/null +++ b/charts/armonik/charts/control-plane/templates/log-configmap.yaml @@ -0,0 +1,20 @@ +{{ if not .Values.global }} +{{ if .Values.logConfigmap.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Values.logConfigmap.metadata.name }} + namespace: {{ .Values.namespace }} +data: + Serilog__MinimumLevel: {{ .Values.logConfigmap.data.loggingLevel }} + # {{ if eq .Values.logConfigmap.data.loggingLevel "Information" }} + # {{ $loggingLevelRouting := "Warning"}} + # {{ else }} + # {{ $loggingLevelRouting := .Values.logConfigmap.data.loggingLevel }} + # {{ end }} + {{ $loggingLevelRouting := ternary "Warning" .Values.logConfigmap.data.loggingLevel (eq .Values.logConfigmap.data.loggingLevel "Information") }} + Serilog__MinimumLevel__Override__Microsoft.AspNetCore.Hosting.Diagnostics: {{ $loggingLevelRouting }} + Serilog__MinimumLevel__Override__Microsoft.AspNetCore.Routing.EndpointMiddleware: {{ $loggingLevelRouting }} + Serilog__MinimumLevel__Override__Serilog.AspNetCore.RequestLoggingMiddleware: {{ $loggingLevelRouting }} +{{ end }} +{{ end }} diff --git a/charts/armonik/charts/control-plane/tests/control_plane_configmap_test.yaml b/charts/armonik/charts/control-plane/tests/control_plane_configmap_test.yaml new file mode 100644 index 000000000..3b0d1140f --- /dev/null +++ b/charts/armonik/charts/control-plane/tests/control_plane_configmap_test.yaml @@ -0,0 +1,21 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json +suite: test control plane configmap +templates: + - control-plane-configmap.yaml +tests: + - it: should work + asserts: + - isKind: + of: ConfigMap + - equal: + path: data.Submitter__DefaultPartition + value: default + - it: should + set: + defaultPartition: "" + partitionNames: + - monitoring + asserts: + - equal: + path: data.Submitter__DefaultPartition + value: monitoring diff --git a/charts/armonik/charts/control-plane/tests/control_plane_deployment_test.yaml b/charts/armonik/charts/control-plane/tests/control_plane_deployment_test.yaml new file mode 100644 index 000000000..c42e1b0a9 --- /dev/null +++ b/charts/armonik/charts/control-plane/tests/control_plane_deployment_test.yaml @@ -0,0 +1,44 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json +suite: test control plane deployment +templates: + - control-plane-deployment.yaml +tests: + - it: should work + set: + name: control-plane + asserts: + - isKind: + of: Deployment + - hasDocuments: + count: 1 + - containsDocument: + kind: Deployment + apiVersion: apps/v1 + name: control-plane + namespace: armonik + - notEqual: + path: spec.template.spec.containers[0].name + value: control-plane-helm + - equal: + path: spec.template.spec.containers[0].image + value: dockerhubaneo/armonik_control:0.19.3 ## make as variable + - equal: + path: spec.template.spec.containers[0].resources + value: + limits: # make it variable + cpu: 1000m + memory: 2048Mi + requests: + cpu: 50m + memory: 50Mi + - contains: + path: spec.template.spec.containers[0].env + content: # make it variable + name: Amqp__Host + valueFrom: + secretKeyRef: + key: host + name: activemq + optional: false + + diff --git a/charts/armonik/charts/control-plane/tests/core_configmap_test.yaml b/charts/armonik/charts/control-plane/tests/core_configmap_test.yaml new file mode 100644 index 000000000..d3e4387fa --- /dev/null +++ b/charts/armonik/charts/control-plane/tests/core_configmap_test.yaml @@ -0,0 +1,16 @@ +# yaml-language-server: $schema=https://raw.githubusercontent.com/helm-unittest/helm-unittest/main/schema/helm-testsuite.json +suite: test core configmap +templates: + - core-configmap.yaml +tests: + - it: should work + set: + coreConfigmap: + data: + Components__TableStorage: "Mongo" + asserts: + - isKind: + of: ConfigMap + - equal: + path: data.Components__TableStorage + value: Mongo diff --git a/charts/armonik/charts/control-plane/tests/log_configmap_test.yaml b/charts/armonik/charts/control-plane/tests/log_configmap_test.yaml new file mode 100644 index 000000000..5480b5fc0 --- /dev/null +++ b/charts/armonik/charts/control-plane/tests/log_configmap_test.yaml @@ -0,0 +1,11 @@ +suite: test log configmap +templates: + - log-configmap.yaml +tests: + - it: should work + asserts: + - isKind: + of: ConfigMap + - matchRegex: + path: metadata.name + pattern: log-configmap-helm diff --git a/charts/armonik/charts/control-plane/values.yaml b/charts/armonik/charts/control-plane/values.yaml new file mode 100644 index 000000000..efbec4fc7 --- /dev/null +++ b/charts/armonik/charts/control-plane/values.yaml @@ -0,0 +1,238 @@ +nameOverride: "" + +replicaCount: 1 + +image: "dockerhubaneo/armonik_control:0.19.3" +imageInfo: + registry: docker.io + repository: dockerhubaneo/armonik_control + tag: 0.19.3 + pullPolicy: IfNotPresent + ## Optionally specify an array of imagePullSecrets. + pullSecrets: "" + +# -- restart policy +restartPolicy: "Always" # Always, OnFailure, Never +serviceAccountName: "" + +# control plane selector +controlPlaneSelector: [] +# -- controlPlane contains all the values of the control plane deployment +name: "control-plane" +labelsApp: "armonik" +labelsService: "control-plane" + +# -- deployment port name and containerPort +namePort: "http" +containerPort: 1080 + +# -- service type and port and protocol +serviceType: "ClusterIP" +port: 5001 +protocol: "TCP" + +# -- control plane annotations +annotations: + key1: "val1" + +# -- control plane node selector +nodeSelector: [] + +resources: + limits: + cpu: "1000m" + memory: "2048Mi" + requests: + cpu: "50m" + memory: "50Mi" + +defaultPartition: "default" + +livenessProbe: + httpGet: + path: "/liveness" + port: 1081 + initialDelaySeconds: 15 + periodSeconds: 5 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 1 + +startupProbe: + httpGet: + path: "/startup" + port: 1081 + initialDelaySeconds: 1 + periodSeconds: 3 + timeoutSeconds: 1 + successThreshold: 1 + failureThreshold: 20 + +configmaps: + - "control-plane-configmap" + - "log-configmap" + - "core-configmap" + +controlPlanConfigmap: + enabled: true + +logConfigmap: + enabled: true + metadata: + name: "log-configmap-helm" + namespace: "armonik" + data: + loggingLevel: "Information" + +coreConfigmap: + enabled: true + metadata: + name: "core-configmap-helm" + data: + Components__TableStorage: "MongoDB" + Components__ObjectStorage: "Redis" + Components__QueueStorage: "Amqp" + Components__QueueAdaptorSettings__ClassName: "ArmoniK.Core.Adapters.Amqp.QueueBuilder" # data.kubernetes_secret.deployed_queue_storage.data.adapter_class_name + Components__QueueAdaptorSettings__AdapterAbsolutePath: "/adapters/queue/amqp/ArmoniK.Core.Adapters.Amqp.dll" # data.kubernetes_secret.deployed_queue_storage.data.adapter_absolute_path + MongoDB__CAFile: "/mongodb/chain.pem" #local.table_storage_adapter_from_secret == "mongodb" ? local.secrets.mongodb.ca_filename : "" + MongoDB__ReplicaSet: "rs0" + MongoDB__DatabaseName: "database" + MongoDB__DirectConnection: "false" + MongoDB__Tls: "true" + Redis__CaPath: "/redis/chain.pem" # local.object_storage_adapter_from_secret == "redis" ? local.secrets.redis.ca_filename : "" + Redis__InstanceName: "ArmoniKRedis" + Redis__ClientName: "ArmoniK.Core" + Redis__Ssl: "true" + Amqp__CaPath: "/amqp/chain.pem" # local.queue_storage_adapter_from_secret == "amqp" ? local.secrets.activemq.ca_filename : "" + Amqp__Scheme: "AMQPS" + Authenticator__RequireAuthentication: false # + Authenticator__RequireAuthorization: false # + +credentials: + # -- activemq + Amqp__User: + key: username + name: activemq + Amqp__Password: + key: password + name: activemq + Amqp__Host: + key: host + name: activemq + Amqp__Port: + key: port + name: activemq + # -- redis + Redis__User: + key: username + name: redis + Redis__Password: + key: password + name: redis + Redis__EndpointUrl: + key: url + name: redis + # -- mongodb + MongoDB__User: + key: username + name: mongodb + MongoDB__Password: + key: password + name: mongodb + MongoDB__Host: + key: host + name: mongodb + MongoDB__Port: + key: port + name: mongodb + # s3 + # - key: username + # name: s3 + # - key: password + # name: mongodb + # - key: url + # name: s3 + # - key: must_force_path_style + # name: s3 + # - key: bucket_name + # name: s3 + # - key: use_chunk_encoding + # name: s3 + # - key: use_check_sum + # name: s3 + +certificates: + activemq: + name: "activemq-secret-volume" + mountPath: "/amqp" + secretName: "activemq" + redis: + name: "redis-secret-volume" + mountPath: "/redis" + secretName: "redis" + mongodb: + name: "mongodb-secret-volume" + mountPath: "/mongodb" + secretName: "mongodb" + +### + +partitionNames: + - "default" + - "monitoring" + +secrets: + activemq: + name: "activemq" + caFileName: "/amqp/chain.pem" + mongodb: + name: "mongodb" + caFileName: "/mongodb/chain.pem" + redis: + name: "redis" + caFileName: "/redis/chain.pem" + s3: "s3" # s3_secret_name + metricsExporter: "metrics-exporter" # metrics_exporter_secret_name + partitionMetrics_exporter: "partition-metrics-exporter" # partition_metrics_exporter_secret_name + fluentBit: "fluent-bit" # fluent_bit_secret_name + seq: "seq" # seq_secret_name + grafana: "grafana" # grafana_secret_name + prometheus: "prometheus" # prometheus_secret_name + deployedObjectStorageSecret: "deployed-object-storage-helm" #eployed_object_storage_secret_name + deployedTableStorageSecret: "deployed-table-storage-helm" # deployed_table_storage_secret_name + deployedQueueStorageSecret: "deployed-queue-storage-helm" # deployed_queue_storage_secret_name + storageEndpointUrl: + objectStorageAdapter: "Redis" # Redis or S3 (Minio) + tableStorageAdapter: "MongoDB" + queueStorageAdapter: "Amqp" + deployedObjectStorages: + - "Redis" + # - '"S3"' + deployedTableStorages: + - "MongoDB" + deployedQueueStorages: + - "Amqp" + sharedStorage: + name: "shared-storage-helm" # shared_storage_secret_name + hostPath: "data" + fileStorageType: "HostPath" + fileServerIp: "" + +extraConf: + core: + Amqp__AllowHostMismatch: true + Amqp__MaxPriority: "10" + Amqp__MaxRetries: "5" + Amqp__QueueStorage__LockRefreshPeriodicity: "00:00:45" + Amqp__QueueStorage__PollPeriodicity: "00:00:10" + Amqp__QueueStorage__LockRefreshExtension: "00:02:00" + MongoDB__TableStorage__PollingDelayMin: "00:00:01" + MongoDB__TableStorage__PollingDelayMax: "00:00:10" + MongoDB__AllowInsecureTls: true + MongoDB__TableStorage__PollingDelay: "00:00:01" + MongoDB__DataRetention: "1.00:00:00" + Redis__Timeout: 30000 + Redis__SslHost: "127.0.0.1" + Redis__TtlTimeSpan: "1.00:00:00" + control: + Submitter__MaxErrorAllowed: "50" diff --git a/charts/armonik/charts/eniconfig/.helmignore b/charts/armonik/charts/eniconfig/.helmignore new file mode 100644 index 000000000..f82e96d46 --- /dev/null +++ b/charts/armonik/charts/eniconfig/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/armonik/charts/eniconfig/Chart.yaml b/charts/armonik/charts/eniconfig/Chart.yaml new file mode 100644 index 000000000..14233def8 --- /dev/null +++ b/charts/armonik/charts/eniconfig/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v2 +name: eniconfig +description: Patch CNI in AWS EKS +kubeVersion: ">=v1.23.0-0" +type: application +version: 0.1.0 +appVersion: "0.1.0" +home: https://github.com/aneoconsulting/ArmoniK.Infra/tree/main/charts/eniconfig +sources: + - https://github.com/aneoconsulting/ArmoniK.Infra/tree/main/charts/eniconfig +maintainers: + - name: Aneo + email: armonik-support@aneo.fr + url: armonik.fr \ No newline at end of file diff --git a/charts/eniconfig/README.md b/charts/armonik/charts/eniconfig/README.md similarity index 78% rename from charts/eniconfig/README.md rename to charts/armonik/charts/eniconfig/README.md index 5bf641422..591d0a395 100644 --- a/charts/eniconfig/README.md +++ b/charts/armonik/charts/eniconfig/README.md @@ -1,30 +1,28 @@ -# eniconfig - -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square) - -Patch CNI in AWS EKS - -**Homepage:** - -## Maintainers - -| Name | Email | Url | -| ---- | ------ | --- | -| Aneo | armonik-support@aneo.fr | armonik.fr | - -## Source Code - -* - -## Requirements - -Kubernetes: `>=v1.23.0-0` - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| subnets | list | `[]` | List of subnet IDs | - ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.7.0](https://github.com/norwoodj/helm-docs/releases/v1.7.0) +# eniconfig + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square) + +Patch CNI in AWS EKS + +**Homepage:** + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| Aneo | | | + +## Source Code + +* + +## Requirements + +Kubernetes: `>=v1.23.0-0` + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| subnets | list | `[]` | List of subnet IDs | + diff --git a/charts/eniconfig/templates/NOTES.txt b/charts/armonik/charts/eniconfig/templates/NOTES.txt similarity index 97% rename from charts/eniconfig/templates/NOTES.txt rename to charts/armonik/charts/eniconfig/templates/NOTES.txt index 1b83a6783..48f58ca19 100644 --- a/charts/eniconfig/templates/NOTES.txt +++ b/charts/armonik/charts/eniconfig/templates/NOTES.txt @@ -1 +1 @@ -Create ENIConfig for every subnet +Create ENIConfig for every subnet diff --git a/charts/eniconfig/templates/_helpers.tpl b/charts/armonik/charts/eniconfig/templates/_helpers.tpl similarity index 96% rename from charts/eniconfig/templates/_helpers.tpl rename to charts/armonik/charts/eniconfig/templates/_helpers.tpl index e65a69e38..408bc24be 100644 --- a/charts/eniconfig/templates/_helpers.tpl +++ b/charts/armonik/charts/eniconfig/templates/_helpers.tpl @@ -1,62 +1,62 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "eniconfig.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "eniconfig.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "eniconfig.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "eniconfig.labels" -}} -helm.sh/chart: {{ include "eniconfig.chart" . }} -{{ include "eniconfig.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "eniconfig.selectorLabels" -}} -app.kubernetes.io/name: {{ include "eniconfig.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "eniconfig.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "eniconfig.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} +{{/* +Expand the name of the chart. +*/}} +{{- define "eniconfig.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "eniconfig.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "eniconfig.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "eniconfig.labels" -}} +helm.sh/chart: {{ include "eniconfig.chart" . }} +{{ include "eniconfig.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "eniconfig.selectorLabels" -}} +app.kubernetes.io/name: {{ include "eniconfig.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "eniconfig.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "eniconfig.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/eniconfig/templates/eniconfig.yaml b/charts/armonik/charts/eniconfig/templates/eniconfig.yaml similarity index 95% rename from charts/eniconfig/templates/eniconfig.yaml rename to charts/armonik/charts/eniconfig/templates/eniconfig.yaml index ddd166415..4fdb9a786 100644 --- a/charts/eniconfig/templates/eniconfig.yaml +++ b/charts/armonik/charts/eniconfig/templates/eniconfig.yaml @@ -1,13 +1,13 @@ -{{- range .Values.subnets }} ---- -apiVersion: crd.k8s.amazonaws.com/v1alpha1 -kind: ENIConfig -metadata: - name: {{ .az_name | quote }} -spec: - subnet: {{ .subnet_id | quote }} - securityGroups: - {{- range .security_group_ids }} - - {{ . | quote }} - {{- end }} -{{- end }} +{{- range .Values.subnets }} +--- +apiVersion: crd.k8s.amazonaws.com/v1alpha1 +kind: ENIConfig +metadata: + name: {{ .az_name | quote }} +spec: + subnet: {{ .subnet_id | quote }} + securityGroups: + {{- range .security_group_ids }} + - {{ . | quote }} + {{- end }} +{{- end }} diff --git a/charts/eniconfig/values.yaml b/charts/armonik/charts/eniconfig/values.yaml similarity index 96% rename from charts/eniconfig/values.yaml rename to charts/armonik/charts/eniconfig/values.yaml index d9cc47eda..735fe5323 100644 --- a/charts/eniconfig/values.yaml +++ b/charts/armonik/charts/eniconfig/values.yaml @@ -1,6 +1,6 @@ -# Default values for eniconfig. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -# -- List of subnet IDs -subnets: [] +# Default values for eniconfig. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +# -- List of subnet IDs +subnets: [] diff --git a/charts/armonik/charts/ingress/.helmignore b/charts/armonik/charts/ingress/.helmignore new file mode 100644 index 000000000..f82e96d46 --- /dev/null +++ b/charts/armonik/charts/ingress/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/charts/armonik/charts/ingress/Chart.yaml b/charts/armonik/charts/ingress/Chart.yaml new file mode 100644 index 000000000..24e3e2719 --- /dev/null +++ b/charts/armonik/charts/ingress/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v2 +name: ingress +description: A Helm chart for Ingress +kubeVersion: ">=v1.23.0-0" +keywords: + - armonik + - helm +type: application +version: 0.1.0 +appVersion: "0.2.2" +maintainers: + - name: Aneo + email: armonik-support@aneo.fr + url: armonik.fr \ No newline at end of file diff --git a/charts/armonik/charts/ingress/README.md b/charts/armonik/charts/ingress/README.md new file mode 100644 index 000000000..21acf90d9 --- /dev/null +++ b/charts/armonik/charts/ingress/README.md @@ -0,0 +1,56 @@ +# ingress + +![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.2.2](https://img.shields.io/badge/AppVersion-0.2.2-informational?style=flat-square) + +A Helm chart for Ingress + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| Aneo | | | + +## Requirements + +Kubernetes: `>=v1.23.0-0` + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | | +| autoscaling.enabled | bool | `false` | | +| autoscaling.maxReplicas | int | `100` | | +| autoscaling.minReplicas | int | `1` | | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | | +| fullnameOverride | string | `""` | | +| image.pullPolicy | string | `"IfNotPresent"` | | +| image.repository | string | `"nginx"` | | +| image.tag | string | `""` | | +| imagePullSecrets | list | `[]` | | +| ingress.annotations | object | `{}` | | +| ingress.className | string | `""` | | +| ingress.enabled | bool | `false` | | +| ingress.hosts[0].host | string | `"chart-example.local"` | | +| ingress.hosts[0].paths[0].path | string | `"/"` | | +| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | | +| ingress.tls | list | `[]` | | +| nameOverride | string | `""` | | +| namespace | string | `"armonik"` | | +| nodeSelector | object | `{}` | | +| podAnnotations | object | `{}` | | +| podLabels | object | `{}` | | +| podSecurityContext | object | `{}` | | +| replicaCount | int | `1` | | +| resources | object | `{}` | | +| securityContext | object | `{}` | | +| service.port | int | `80` | | +| service.type | string | `"ClusterIP"` | | +| serviceAccount.annotations | object | `{}` | | +| serviceAccount.automount | bool | `true` | | +| serviceAccount.create | bool | `true` | | +| serviceAccount.name | string | `""` | | +| tolerations | list | `[]` | | +| volumeMounts | list | `[]` | | +| volumes | list | `[]` | | + diff --git a/charts/armonik/charts/ingress/templates/NOTES.txt b/charts/armonik/charts/ingress/templates/NOTES.txt new file mode 100644 index 000000000..21204e7ae --- /dev/null +++ b/charts/armonik/charts/ingress/templates/NOTES.txt @@ -0,0 +1,2 @@ +1. Get the application URL by running these commands: +# TODO diff --git a/charts/keda-hpa/templates/_helpers.tpl b/charts/armonik/charts/ingress/templates/_helpers.tpl similarity index 71% rename from charts/keda-hpa/templates/_helpers.tpl rename to charts/armonik/charts/ingress/templates/_helpers.tpl index 2880ff033..23cbbfa25 100644 --- a/charts/keda-hpa/templates/_helpers.tpl +++ b/charts/armonik/charts/ingress/templates/_helpers.tpl @@ -1,62 +1,62 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "keda-hpa-activemq.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Create a default fully qualified app name. -We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). -If release name contains chart name it will be used as a full name. -*/}} -{{- define "keda-hpa-activemq.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} -{{- end }} - -{{/* -Create chart name and version as used by the chart label. -*/}} -{{- define "keda-hpa-activemq.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "keda-hpa-activemq.labels" -}} -helm.sh/chart: {{ include "keda-hpa-activemq.chart" . }} -{{ include "keda-hpa-activemq.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "keda-hpa-activemq.selectorLabels" -}} -app.kubernetes.io/name: {{ include "keda-hpa-activemq.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "keda-hpa-activemq.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "keda-hpa-activemq.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} +{{/* +Expand the name of the chart. +*/}} +{{- define "ingress.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "ingress.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "ingress.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "ingress.labels" -}} +helm.sh/chart: {{ include "ingress.chart" . }} +{{ include "ingress.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "ingress.selectorLabels" -}} +app.kubernetes.io/name: {{ include "ingress.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "ingress.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "ingress.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/armonik/charts/ingress/templates/ingress.yaml b/charts/armonik/charts/ingress/templates/ingress.yaml new file mode 100644 index 000000000..1c313113b --- /dev/null +++ b/charts/armonik/charts/ingress/templates/ingress.yaml @@ -0,0 +1,35 @@ +{{- if .Values.ingress.enabled -}} {{/* TODO: Check this */}} +{{- $fullName := include "ingress.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} + {{- end }} +{{- end }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + {{- if .Values.global.namespace }} # use the global value if it is set, + namespace: {{ .Values.global.namespace }} + {{- else }} # else use local value + namespace: {{ .Values.namespace }} + {{- end }} + labels: + {{- include "ingress.labels" . | nindent 4 }} + app: {{/* TODO */}} + service: {{/* TODO */}} + {{- with .Values.ingress.annotations }} {{/* TODO // Check if there is annotations for ingress */}} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + replicas: {{ .Values.replicaCount }} + {{/* TODO */}} +{{- end }} diff --git a/charts/armonik/charts/ingress/values.yaml b/charts/armonik/charts/ingress/values.yaml new file mode 100644 index 000000000..d56757fbe --- /dev/null +++ b/charts/armonik/charts/ingress/values.yaml @@ -0,0 +1,100 @@ +# Default values for ingress. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +namespace: "armonik" + +replicaCount: 1 + +image: + repository: nginx + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Automatically mount a ServiceAccount's API credentials? + automount: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} +podLabels: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +# Additional volumes on the output Deployment definition. +volumes: [] +# - name: foo +# secret: +# secretName: mysecret +# optional: false + +# Additional volumeMounts on the output Deployment definition. +volumeMounts: [] +# - name: foo +# mountPath: "/etc/foo" +# readOnly: true + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/charts/armonik/templates/NOTES.txt b/charts/armonik/templates/NOTES.txt new file mode 100644 index 000000000..9faf56be0 --- /dev/null +++ b/charts/armonik/templates/NOTES.txt @@ -0,0 +1,22 @@ +1. Get the Armonik URL ADMIN GUI by running these commands: +{{- if .Values.ingress.enabled }} +{{- range $host := .Values.ingress.hosts }} + {{- range .paths }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} + {{- end }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "armonik.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch its status by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "armonik.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "armonik.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "armonik.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT +{{- end }} \ No newline at end of file diff --git a/charts/armonik/templates/_helpers.tpl b/charts/armonik/templates/_helpers.tpl new file mode 100644 index 000000000..7180a4dbc --- /dev/null +++ b/charts/armonik/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "armonik.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "armonik.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "armonik.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "armonik.labels" -}} +helm.sh/chart: {{ include "armonik.chart" . }} +{{ include "armonik.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "armonik.selectorLabels" -}} +app.kubernetes.io/name: {{ include "armonik.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "armonik.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "armonik.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/charts/armonik/templates/core-configmap.yaml b/charts/armonik/templates/core-configmap.yaml new file mode 100644 index 000000000..f1a9373dc --- /dev/null +++ b/charts/armonik/templates/core-configmap.yaml @@ -0,0 +1,14 @@ +{{ if .Values.coreConfigmap.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Values.coreConfigmap.metadata.name }} + namespace: {{ .Values.namespace }} +data: + {{- range $i, $value := .Values.coreConfigmap.data }} + {{ $i }}: {{ $value | quote }} + {{- end }} + {{- range $i, $value := .Values.extraConf.core }} + {{ $i }}: {{ $value | quote }} + {{- end }} +{{ end }} diff --git a/charts/armonik/templates/log-configmap.yaml b/charts/armonik/templates/log-configmap.yaml new file mode 100644 index 000000000..4678476e1 --- /dev/null +++ b/charts/armonik/templates/log-configmap.yaml @@ -0,0 +1,18 @@ +{{ if .Values.logConfigmap.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ .Values.logConfigmap.metadata.name }} + namespace: {{ .Values.namespace }} +data: + Serilog__MinimumLevel: {{ .Values.logConfigmap.data.loggingLevel }} + # {{ if eq .Values.logConfigmap.data.loggingLevel "Information" }} + # {{ $loggingLevelRouting := "Warning"}} + # {{ else }} + # {{ $loggingLevelRouting := .Values.logConfigmap.data.loggingLevel }} + # {{ end }} + {{ $loggingLevelRouting := ternary "Warning" .Values.logConfigmap.data.loggingLevel (eq .Values.logConfigmap.data.loggingLevel "Information") }} + Serilog__MinimumLevel__Override__Microsoft.AspNetCore.Hosting.Diagnostics: {{ $loggingLevelRouting }} + Serilog__MinimumLevel__Override__Microsoft.AspNetCore.Routing.EndpointMiddleware: {{ $loggingLevelRouting }} + Serilog__MinimumLevel__Override__Serilog.AspNetCore.RequestLoggingMiddleware: {{ $loggingLevelRouting }} +{{ end }} diff --git a/charts/armonik/templates/tests/test-connection.yaml b/charts/armonik/templates/tests/test-connection.yaml new file mode 100644 index 000000000..0f295dd1c --- /dev/null +++ b/charts/armonik/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "armonik.fullname" . }}-test-connection" + labels: + {{- include "armonik.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "armonik.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/charts/armonik/values.yaml b/charts/armonik/values.yaml new file mode 100644 index 000000000..3dfc88759 --- /dev/null +++ b/charts/armonik/values.yaml @@ -0,0 +1,180 @@ +armonik: + registry: dockerhubaneo # (Pourquoi dockerhub dans le nom ???) + +global: + namespace: "armonik" + +replicaCount: 1 + +control-plane: + enabled: true +compute-plane: + enabled: true +minio: + enabled: false +redis: + enabled: false +mongodb: + enabled: false +mongodb-sharded: + enabled: false +prometheus: + enabled: false +rabbitmq: + enabled: false + ## +keda: + enabled: false + namespace: armonik + global: + namespace: "armonik" + suffix: "" + scaleTargetRef: + apiVersion: "apps/v1" + kind: "Deployment" + name: "" + envSourceContainerName: ".spec.template.spec.containers[0]" + pollingInterval: 30 + cooldownPeriod: 300 + idleReplicaCount: 0 + minReplicaCount: 1 + maxReplicaCount: 100 + fallback: + failureThreshold: 3 + replicas: 6 + behavior: + restoreToOriginalReplicaCount: false + stabilizationWindowSeconds: 300 + type: Percent + value: 100 + periodSeconds: 15 + triggers: [] +## + +metrics-server: + enabled: false +cluster-autoscaler: + enabled: false + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Automatically mount a ServiceAccount's API credentials? + automount: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} +podLabels: {} + +podSecurityContext: {} + # fsGroup: 2000 + +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + repository: nginx + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + className: "" + annotations: {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + +volumes: [] + +volumeMounts: [] + +nodeSelector: {} + +tolerations: [] + +affinity: {} + + +partitionNames: + - "default" + - "monitoring" + +extraConf: + core: + Amqp__AllowHostMismatch: true + Amqp__MaxPriority: "10" + Amqp__MaxRetries: "5" + Amqp__QueueStorage__LockRefreshPeriodicity: "00:00:45" + Amqp__QueueStorage__PollPeriodicity: "00:00:10" + Amqp__QueueStorage__LockRefreshExtension: "00:02:00" + MongoDB__TableStorage__PollingDelayMin: "00:00:01" + MongoDB__TableStorage__PollingDelayMax: "00:00:10" + MongoDB__AllowInsecureTls: true + MongoDB__TableStorage__PollingDelay: "00:00:01" + MongoDB__DataRetention: "1.00:00:00" + Redis__Timeout: 30000 + Redis__SslHost: "127.0.0.1" + Redis__TtlTimeSpan: "1.00:00:00" + control: + Submitter__MaxErrorAllowed: "50" + +controlPlanConfigmapEnabled: false +controlPlanConfigmap: + - "control-plane-configmap" + - "log-configmap" + - "core-configmap" + + +logConfigmap: + enabled: false + metadata: + name: "log-configmap-helm" + namespace: "armonik" + data: + loggingLevel: "Information" + +coreConfigmap: + enabled: false + metadata: + name: "core-configmap-helm" + data: + Components__TableStorage: "MongoDB" + Components__ObjectStorage: "Redis" + Components__QueueStorage: "Amqp" + Components__QueueAdaptorSettings__ClassName: "ArmoniK.Core.Adapters.Amqp.QueueBuilder" # data.kubernetes_secret.deployed_queue_storage.data.adapter_class_name + Components__QueueAdaptorSettings__AdapterAbsolutePath: "/adapters/queue/amqp/ArmoniK.Core.Adapters.Amqp.dll" # data.kubernetes_secret.deployed_queue_storage.data.adapter_absolute_path + MongoDB__CAFile: "/mongodb/chain.pem" #local.table_storage_adapter_from_secret == "mongodb" ? local.secrets.mongodb.ca_filename : "" + MongoDB__ReplicaSet: "rs0" + MongoDB__DatabaseName: "database" + MongoDB__DirectConnection: "false" + MongoDB__Tls: "true" + Redis__CaPath: "/redis/chain.pem" # local.object_storage_adapter_from_secret == "redis" ? local.secrets.redis.ca_filename : "" + Redis__InstanceName: "ArmoniKRedis" + Redis__ClientName: "ArmoniK.Core" + Redis__Ssl: "true" + Amqp__CaPath: "/amqp/chain.pem" # local.queue_storage_adapter_from_secret == "amqp" ? local.secrets.activemq.ca_filename : "" + Amqp__Scheme: "AMQPS" + Authenticator__RequireAuthentication: false # + Authenticator__RequireAuthorization: false # \ No newline at end of file diff --git a/charts/best-practices.md b/charts/best-practices.md new file mode 100644 index 000000000..bfc57a0b3 --- /dev/null +++ b/charts/best-practices.md @@ -0,0 +1,277 @@ +# Best practices + +This document presents some of the most known best practices in writing +Helm charts. Most of the best practices are described in the [Helm docs](https://helm.sh/docs/) page. Other resources are also used ([boxunix](https://boxunix.com/2022/02/05/developers-guide-to-writing-a-good-helm-chart/), [Bitnami docs](https://docs.bitnami.com/tutorials/production-ready-charts/), [Argonaut](https://www.argonaut.dev/blog/helm-best-practices) +[Codefresh](https://codefresh.io/docs/docs/ci-cd-guides/helm-best-practices/) +[Itnext](https://itnext.io/helm-3-umbrella-charts-standalone-chart-image-tags-an-alternative-approach-78a218d74e2d)). + +This guide will be used by [Aneo](https://www.aneo.eu/) to write Helm charts for the [Armonik plateform](https://www.armonik.fr/). + +## Coding standart + +### Conventions and constraints [argonaut](https://www.argonaut.dev/blog/helm-best-practices) + +Here are some common conventions and constraints when it comes to naming Helm components. + +|Component | Convention / Constraint | +|----------|-------------------------| +|Chart names | Chart names must be lowercase alphanumeric with dashes (-) used to separate words. Uppercase letters, underscores, and dots are not allowed. | +|Version numbers | Helm prefers SemVer 2 for version numbers, except for Docker image tags. When storing SemVer versions in Kubernetes labels, replace the "+" character with "_" since labels do not allow "+". | +|YAML indentation | YAML files should use two spaces for indentation, not tabs. | +|Helm terminology | "Helm" refers to the project as a whole, while "helm" refers to the client-side command. | +|Chart terminology | "chart" does not need to be capitalized, except for "Chart.yaml" file which is case sensitive. | +|Variables | Variable names should start with a lowercase letter and use camel case to separate words. | +|YAML structure | While YAML allows nested values, it is recommended to prefer a flat structure for simplicity and ease of use. | +|Sharing templates | Parent charts and subcharts can share templates. Any defined block in any chart is available to other charts. | +|Block vs. Include | In Helm charts, it is recommended to use "include" instead of "block" for overriding default implementations, as multiple implementations of the same block can result in unpredictable behavior. | +| manifests | Do not put multiple resources in one manifest file. [boxunix](https://boxunix.com/2022/02/05/developers-guide-to-writing-a-good-helm-chart/) | +| Naming resources | Avoid stutter when naming your resources. (ex: kind: pod, name: armonik-pod) [boxunix](https://boxunix.com/2022/02/05/developers-guide-to-writing-a-good-helm-chart/) | + +Flat or Nested Values ?? +In most cases, flat should be favored over nested. The reason for this is that it is simpler for template developers and users. For every layer of nesting, an existence check must be done. But for flat configuration, such checks can be skipped, making the template easier to read and use. + +### Variables + +A variable is a named reference to another object. +It follows the form $name. Variables are assigned with a special assignment operator `:=`. + +~~~ +{{- $relname := .Release.Name -}} +release: {{ $relname }} +~~~ + +### Using labels +Labels serve as a convenient way to quickly identify resources created by Helm releases. +To define labels, a common approach is to use the _helpers.tpl file: + +~~~ +{{/* +Common labels +*/}} +{{- define "common.labels" -}} +app.kubernetes.io/instance: {{ .Release.Name }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} +~~~ + +Subsequently, labels can be included in resource templates using the "include" function: + +~~~ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: my-queue + labels: +{{ include "common.labels" . | indent 4 }} +... +~~~ + +use app.kubernetes.io/* + + +### Documenting charts +- Comments +- README +- NOTES.txt + +### Securing secrets + +the helm-secrets plugin can be utilized. +This plugin leverages Mozilla SOPS, +which supports encryption using various +key management services like AWS KMS, +Google Cloud KMS, Azure Key Vault, and PGP. + +### Reusable charts using template functions +- default +- required +- .. + +### Resource policies to opt out of resource deletion +By employing resource-policy annotations, +you can carefully manage the lifecycle of your resources +and ensure that important data is not inadvertently +lost during the uninstallation process. (Quotation marks are required) + +## Umbrella charts + +### Subcharts +Each subchart in Helm has to be a standalone chart. And thus, a subchart cannot be dependent on its parent chart. However, a parent chart can override values of the subchart. +~~~ +armonik/ + ├── Chart.yaml + ├── values.yaml + ├── charts/ + │ ├── control-plane/ + │ │ ├── Chart.yaml + │ │ ├── values.yaml + │ │ └── templates/ + │ │ ├── control-plane-deployment.yaml + │ │ ├── control-plane-service.yaml + │ │ └── ... + │ └── compute-plane/ + │ ├── Chart.yaml + │ ├── values.yaml + │ └── templates/ + │ ├── compute-plane-deployment.yaml + │ ├── compute-plane-service.yaml + │ └── ... + └── templates/ + ├── armonik-deployment.yaml + ├── armonik-service.yaml + └── ... +~~~ + +You can override the values of subcharts in the parent chart with the values.yaml file. + +### Using global values +Global values in Helm refer to the values that can be accessed by all charts in your chart directory. +These are defined in the values.yaml file as global: parameters. +The Values data type has a reserved section called Values.global +where global values can be set. + +Example: +~~~ umbrella-chart/values.yaml +global: + foo: bar +~~~ + +By specifying the global variable, sub-charts can now +reference the global value in the parent’s values.yaml file as follows. + +~~~ umbrella-chart/charts/subchart/templates/deployment.yaml +{{- if .Values.global.foo }} # use the global value if it is set, ( if we want to deploy the sub-chart alone: {{- if .Values.global }} ) + key1: {{ .Values.global.foo }} +{{- else }} # else use local value + key1: {{ .Values.foo }} +{{- end }} +~~~ + +## Library charts + + +## Versionning [codefresh](https://codefresh.io/docs/docs/ci-cd-guides/helm-best-practices/) + +Each Helm chart has the ability to define two separate versions: +- version in Chart.yaml: The version of the chart itself. +- appVersion in Chart.yaml: The version of the application contained in the chart. +These are unrelated and can be bumped up in any manner. +You can sync them together or have them increase independently. +There is no right or wrong practice here as long as you stick into one. + +1. Simple 1-1 versioning: keep the chart version in sync with your actual application (don't use appVersion) +2. Chart versus application versioning: individually version charts and application + - if changes are happening in the charts themselves all the time + - must define a chart versionning strategy ! +3. Umbrella charts: the same can applyed as the two above + - the chart and the sub-charts have the same version + - when exactly the parent chart version should be bumped. + - Is it only when a child chart changes? + - Only when an application changes? + - or both? + + +from: [itnext](https://itnext.io/helm-3-umbrella-charts-standalone-chart-image-tags-an-alternative-approach-78a218d74e2d) + +When making use of umbrella charts to deploy a multi-component stack, +particularly where the sub-components of the stack will rarely, +if ever, be deployed standalone, it makes sense to migrate image +tag versions to the umbrella chart and maintain these here. + +=> use "global" in the umbrella chart to maintain sub-charts versions ! + +## Helm promotion strategies + +- promotion between environments (testing, staging, production). + +### Single repository with multiple environments +A single Helm chart (the same across environments). +It is deployed to multiple targets using a different set of values. + +### Chart promotion between environments +The recommended deployment workflow. + +## chart repository +use ArtifactHub: https://artifacthub.io/packages/search?kind=0 +use our own repo: + +A chart repository is an HTTP server that houses an index.yaml file and optionally some packaged charts. A chart repository can be any HTTP server that can serve YAML and tar files and can answer GET requests. + +~~~ +charts/ + |- index.yaml + |- alpine-0.1.2.tgz + |- alpine-0.1.2.tgz.prov +~~~ + +We can use GitHub Pages [Helm docs](https://helm.sh/docs/topics/chart_repository/). + +## Abbreviation + +Use abbreviation in naming manifests: + +| Abbreviation | Full name | +| ------------ | ----------------------- | +| svc | service | +| deploy | deployment | +| cm | configmap | +| secret | secret | +| ds | daemonset | +| rc | replicationcontroller | +| petset | petset | +| po | pod | +| hpa | horizontalpodautoscaler | +| ing | ingress | +| job | job | +| limit | limitrange | +| ns | namespace | +| pv | persistentvolume | +| pvc | persistentvolumeclaim | +| sa | serviceaccount | + + +## Security [bitnami](https://docs.bitnami.com/tutorials/production-ready-charts/) + +### Use non-root containers + +~~~ +spec: + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + {{- end }} + {{- if .Values.securityContext.enabled }} + securityContext: + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- end }} +~~~ + + + + +In values: +~~~ +securityContext: + enabled: true + fsGroup: 1001 + runAsUser: 1001 +~~~ + +### Do not persist the configuration +### Integrate charts with logging and monitoring tools + +## Tests: + + +## Questions: + +In terraform (control-plane.tf): The service uses the deployement labels (app, service) ! +is that means that the service created after the deployment is created ? +is it more sense to make a values (for app and service) that will be used by both deployment and service ? + + + +## TODO: +- Use control-plane.labels of _helpers.tpl + - add extraLabels + diff --git a/charts/eniconfig/Chart.yaml b/charts/eniconfig/Chart.yaml deleted file mode 100644 index a363acc42..000000000 --- a/charts/eniconfig/Chart.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: v2 -name: eniconfig -description: Patch CNI in AWS EKS - -# Specify the Kubernetes version range that we support. -kubeVersion: ">=v1.23.0-0" - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "0.1.0" - -home: https://github.com/aneoconsulting/ArmoniK.Infra/tree/main/charts/eniconfig -sources: - - https://github.com/aneoconsulting/ArmoniK.Infra/tree/main/charts/eniconfig - -# Maintainers -maintainers: - - name: Aneo - email: armonik-support@aneo.fr - url: armonik.fr diff --git a/charts/keda-hpa/Chart.yaml b/charts/keda-hpa/Chart.yaml deleted file mode 100644 index 115abbca5..000000000 --- a/charts/keda-hpa/Chart.yaml +++ /dev/null @@ -1,37 +0,0 @@ -apiVersion: v2 -name: keda-hpa-activemq -description: Keda scaledobject for HPA in ArmoniK - -# Specify the Kubernetes version range that we support. -kubeVersion: ">=v1.23.0-0" - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "0.1.0" - -home: https://github.com/aneoconsulting/ArmoniK.Infra/tree/main/charts/keda-hpa -sources: - - https://github.com/aneoconsulting/ArmoniK.Infra/tree/main/charts/keda-hpa - -# Maintainers -maintainers: - - name: Aneo - email: armonik-support@aneo.fr - url: armonik.fr diff --git a/charts/keda-hpa/README.md b/charts/keda-hpa/README.md deleted file mode 100644 index 300da2f02..000000000 --- a/charts/keda-hpa/README.md +++ /dev/null @@ -1,50 +0,0 @@ -# keda-hpa-activemq - -![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square) - -Keda scaledobject for HPA in ArmoniK - -**Homepage:** - -## Maintainers - -| Name | Email | Url | -| ---- | ------ | --- | -| Aneo | armonik-support@aneo.fr | armonik.fr | - -## Source Code - -* - -## Requirements - -Kubernetes: `>=v1.23.0-0` - -## Values - -| Key | Type | Default | Description | -|-----|------|---------|-------------| -| behavior | object | `{"periodSeconds":15,"restoreToOriginalReplicaCount":false,"stabilizationWindowSeconds":300,"type":"Percent","value":100}` | Advanced options to manage the behavior of the HPA | -| behavior.periodSeconds | int | `15` | Period in seconds | -| behavior.restoreToOriginalReplicaCount | bool | `false` | Restore to the original replicas count | -| behavior.stabilizationWindowSeconds | int | `300` | Stabilization window in seconds | -| behavior.type | string | `"Percent"` | Type of the target | -| behavior.value | int | `100` | Value of the target | -| cooldownPeriod | int | `300` | Cooldown period in seconds | -| fallback | object | `{"failureThreshold":3,"replicas":6}` | Fallback options | -| fallback.failureThreshold | int | `3` | Threshold of failures | -| fallback.replicas | int | `6` | Number of replicas | -| idleReplicaCount | int | `0` | Count of idle replicas | -| maxReplicaCount | int | `100` | Maximum count of replicas | -| minReplicaCount | int | `1` | Minimum count of replicas | -| pollingInterval | int | `30` | Polling interval in seconds | -| scaleTargetRef | object | `{"apiVersion":"apps/v1","envSourceContainerName":".spec.template.spec.containers[0]","kind":"Deployment","name":""}` | Scale target reference | -| scaleTargetRef.apiVersion | string | `"apps/v1"` | Kubernetes API version to be used | -| scaleTargetRef.envSourceContainerName | string | `".spec.template.spec.containers[0]"` | Name of the container to be scaled | -| scaleTargetRef.kind | string | `"Deployment"` | Kid of the Kubernetes resource to be scaled | -| scaleTargetRef.name | string | `""` | Name of the Kubernetes resource to be scaled | -| suffix | string | `""` | Suffix to add to the resource | -| triggers | list | `[]` | Triggers for HPA | - ----------------------------------------------- -Autogenerated from chart metadata using [helm-docs v1.7.0](https://github.com/norwoodj/helm-docs/releases/v1.7.0) diff --git a/charts/keda-hpa/templates/scale-object.yaml b/charts/keda-hpa/templates/scale-object.yaml deleted file mode 100644 index 4a2d6bb37..000000000 --- a/charts/keda-hpa/templates/scale-object.yaml +++ /dev/null @@ -1,34 +0,0 @@ -{{ if .Values.triggers }} ---- -apiVersion: keda.sh/v1alpha1 -kind: ScaledObject -metadata: - name: {{ .Values.suffix }} - namespace: {{ .Release.Namespace }} -spec: - scaleTargetRef: - apiVersion: {{ .Values.scaleTargetRef.apiVersion }} # Optional. Default: apps/v1 - kind: {{ .Values.scaleTargetRef.kind }} # Optional. Default: Deployment - name: {{ .Values.scaleTargetRef.name }} # Mandatory. Must be in the same namespace as the ScaledObject - envSourceContainerName: {{ .Values.scaleTargetRef.envSourceContainerName }} # Optional. Default: .spec.template.spec.containers[0] - pollingInterval: {{ .Values.pollingInterval }} # Optional. Default: 30 seconds - cooldownPeriod: {{ .Values.cooldownPeriod }} # Optional. Default: 300 seconds - # idleReplicaCount: {{ .Values.idleReplicaCount }} # Optional. Default: ignored, must be less than minReplicaCount - minReplicaCount: {{ .Values.minReplicaCount }} # Optional. Default: 0 - maxReplicaCount: {{ .Values.maxReplicaCount }} # Optional. Default: 100 - # fallback: # Optional. Section to specify fallback options - # failureThreshold: {{ .Values.fallback.failureThreshold }} # Mandatory if fallback section is included - # replicas: {{ .Values.fallback.replicas }} # Mandatory if fallback section is included - advanced: # Optional. Section to specify advanced options - restoreToOriginalReplicaCount: {{ .Values.behavior.restoreToOriginalReplicaCount }} # Optional. Default: false - horizontalPodAutoscalerConfig: # Optional. Section to specify HPA related options - behavior: # Optional. Use to modify HPA's scaling behavior - scaleDown: - stabilizationWindowSeconds: {{ .Values.behavior.stabilizationWindowSeconds }} - policies: - - type: {{ .Values.behavior.type }} - value: {{ .Values.behavior.value }} - periodSeconds: {{ .Values.behavior.periodSeconds }} - triggers: -{{ toYaml .Values.triggers | indent 4 }} -{{ end }} diff --git a/charts/keda-hpa/values.yaml b/charts/keda-hpa/values.yaml deleted file mode 100644 index 7ac7d5629..000000000 --- a/charts/keda-hpa/values.yaml +++ /dev/null @@ -1,51 +0,0 @@ -# Default values for keda-hpa-activemq. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. - -# -- Suffix to add to the resource -suffix: "" - -# -- Scale target reference -scaleTargetRef: - # -- Kubernetes API version to be used - apiVersion: "apps/v1" # Optional. Default: apps/v1 - # -- Kid of the Kubernetes resource to be scaled - kind: "Deployment" # Optional. Default: Deployment - # -- Name of the Kubernetes resource to be scaled - name: "" # Mandatory. Must be in the same namespace as the ScaledObject - # -- Name of the container to be scaled - envSourceContainerName: ".spec.template.spec.containers[0]" # Optional. Default: .spec.template.spec.containers[0] - -# -- Polling interval in seconds -pollingInterval: 30 # Optional. Default: 30 seconds -# -- Cooldown period in seconds -cooldownPeriod: 300 # Optional. Default: 300 seconds -# -- Count of idle replicas -idleReplicaCount: 0 # Optional. Default: ignored, must be less than minReplicaCount -# -- Minimum count of replicas -minReplicaCount: 1 # Optional. Default: 0 -# -- Maximum count of replicas -maxReplicaCount: 100 # Optional. Default: 100 - -# -- Fallback options -fallback: # Optional. Section to specify fallback options - # -- Threshold of failures - failureThreshold: 3 # Mandatory if fallback section is included - # -- Number of replicas - replicas: 6 # Mandatory if fallback section is included - -# -- Advanced options to manage the behavior of the HPA -behavior: # Optional. Section to specify advanced options - # -- Restore to the original replicas count - restoreToOriginalReplicaCount: false # Optional. Default: false - # -- Stabilization window in seconds - stabilizationWindowSeconds: 300 - # -- Type of the target - type: Percent - # -- Value of the target - value: 100 - # -- Period in seconds - periodSeconds: 15 - -# -- Triggers for HPA -triggers: []