diff --git a/README.md b/README.md index 1f67c56..4ac6234 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,20 @@ This repository contains helm charts for the following services: * [access-control-srv](./charts/access-control-srv) +* [catalog-srv](./charts/catalog-srv) +* [console](./charts/console) +* [fulfillment-srv](./charts/fulfillment-srv) * [identity-srv](./charts/identity-srv) +* [indexing-srv](./charts/indexing-srv) +* [invoicing-srv](./charts/invoicing-srv) * [notification-srv](./charts/notification-srv) +* [ordering-srv](./charts/ordering-srv) * [ostorage-srv](./charts/ostorage-srv) +* [payment-srv](./charts/payment-srv) * [pdf-rendering-srv](./charts/pdf-rendering-srv) * [rendering-srv](./charts/rendering-srv) * [scheduling-srv](./charts/scheduling-srv) +* [store-front](./charts/store-front) * [system](./charts/system) ## Installation diff --git a/charts/access-control-srv/Chart.yaml b/charts/access-control-srv/Chart.yaml index 7894d86..45cf4f1 100644 --- a/charts/access-control-srv/Chart.yaml +++ b/charts/access-control-srv/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: access-control-srv description: A Helm chart for restorecommerce access-control-srv type: application -version: 0.1.1 -appVersion: 0.1.3 +version: 0.1.2 +appVersion: 0.1.6 icon: https://avatars0.githubusercontent.com/u/8339525 home: https://docs.restorecommerce.io/access-control-srv/index.html sources: diff --git a/charts/access-control-srv/README.md b/charts/access-control-srv/README.md index f88768e..5a3b5fe 100644 --- a/charts/access-control-srv/README.md +++ b/charts/access-control-srv/README.md @@ -1,6 +1,6 @@ # access-control-srv -![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.3](https://img.shields.io/badge/AppVersion-0.1.3-informational?style=flat-square) +![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.6](https://img.shields.io/badge/AppVersion-0.1.6-informational?style=flat-square) A Helm chart for restorecommerce access-control-srv @@ -32,9 +32,9 @@ A Helm chart for restorecommerce access-control-srv | env.extras | list | `[]` | Any extra environment variables appended to all pods | | env.nodeEnv | string | `"production"` | The selected node environment and config | | fullnameOverride | string | `""` | Full name override for all resources | -| image.pullPolicy | string | `"IfNotPresent"` | Pull policy of the deployment | +| image.pullPolicy | string | `"Always"` | Pull policy of the deployment | | image.repository | string | `"restorecommerce/access-control-srv"` | Image to be used for deployment | -| image.tag | string | `"0.1.3"` | Image tag | +| image.tag | string | `"0.1.6"` | Image tag | | imagePullSecrets | list | `[]` | List of secrets for images | | nameOverride | string | `""` | Name override for all resources | | nodeSelector | object | `{}` | Specify the nodeSelector for all pods | diff --git a/charts/access-control-srv/templates/deployment.yaml b/charts/access-control-srv/templates/deployment.yaml index f7a3489..54802b8 100644 --- a/charts/access-control-srv/templates/deployment.yaml +++ b/charts/access-control-srv/templates/deployment.yaml @@ -49,17 +49,16 @@ spec: periodSeconds: 30 exec: command: - - sh - - -c - - NODE_OPTIONS=--no-deprecation npm run --silent healthcheck + - /bin/grpc_health_probe + - -addr=:50051 readinessProbe: initialDelaySeconds: 10 - periodSeconds: 30 + periodSeconds: 15 exec: command: - - sh - - -c - - NODE_OPTIONS=--no-deprecation npm run --silent healthcheck + - /bin/grpc_health_probe + - -addr=:50051 + - -service=readiness resources: {{- toYaml .Values.resources | nindent 12 }} {{- if or .Values.config.name .Values.config.literal }} diff --git a/charts/access-control-srv/values.yaml b/charts/access-control-srv/values.yaml index 5c1c460..ac9c9e7 100644 --- a/charts/access-control-srv/values.yaml +++ b/charts/access-control-srv/values.yaml @@ -8,10 +8,10 @@ image: repository: restorecommerce/access-control-srv # image.pullPolicy -- Pull policy of the deployment - pullPolicy: IfNotPresent + pullPolicy: Always # image.tag -- Image tag - tag: 0.1.3 + tag: 0.1.6 # imagePullSecrets -- List of secrets for images imagePullSecrets: [] diff --git a/charts/catalog-srv/.helmignore b/charts/catalog-srv/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/catalog-srv/.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/catalog-srv/Chart.yaml b/charts/catalog-srv/Chart.yaml new file mode 100644 index 0000000..e22e122 --- /dev/null +++ b/charts/catalog-srv/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v2 +name: catalog-srv +description: A Helm chart for restorecommerce catalog-srv +type: application +version: 0.1.0 +appVersion: 0.0.3 +icon: https://avatars0.githubusercontent.com/u/8339525 +home: https://docs.restorecommerce.io/catalog-srv/index.html +sources: + - https://github.com/restorecommerce/catalog-srv +maintainers: + - name: restorecommerce + url: https://restorecommerce.io/ + email: info@restorecommerce.io diff --git a/charts/catalog-srv/README.md b/charts/catalog-srv/README.md new file mode 100644 index 0000000..d6d8a59 --- /dev/null +++ b/charts/catalog-srv/README.md @@ -0,0 +1,51 @@ +# catalog-srv + +![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.0.3](https://img.shields.io/badge/AppVersion-0.0.3-informational?style=flat-square) + +A Helm chart for restorecommerce catalog-srv + +**Homepage:** + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| restorecommerce | info@restorecommerce.io | https://restorecommerce.io/ | + +## Source Code + +* + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | Specify the affinity for all pods | +| autoscaling.enabled | bool | `false` | Enable HPA | +| autoscaling.maxReplicas | int | `100` | Max amount of replicas for HPA | +| autoscaling.minReplicas | int | `1` | Min amount of replicas for HPA | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU usage for HPA | +| autoscaling.targetMemoryUtilizationPercentage | int | `80` | Target memory usage for HPA | +| config.file | string | `"config_production_override.json"` | Name of the file in the config map | +| config.literal | string | `""` | Provide the literal config through this string. Has to be in a JSON format | +| config.name | string | `""` | Name of the config map to be mounted. If specified, config will be appended to the node environment automatically | +| env.extras | list | `[]` | Any extra environment variables appended to all pods | +| env.nodeEnv | string | `"production"` | The selected node environment and config | +| fullnameOverride | string | `""` | Full name override for all resources | +| image.pullPolicy | string | `"Always"` | Pull policy of the deployment | +| image.repository | string | `"restorecommerce/catalog-srv"` | Image to be used for deployment | +| image.tag | string | `"0.0.3"` | Image tag | +| imagePullSecrets | list | `[]` | List of secrets for images | +| nameOverride | string | `""` | Name override for all resources | +| nodeSelector | object | `{}` | Specify the nodeSelector for all pods | +| podAnnotations | object | `{}` | Any extra annotations for all pods | +| podSecurityContext | object | `{}` | Security context override for all pods | +| replicaCount | int | `1` | Replica count of the deployment | +| resources | object | `{}` | Any resource configuration applied to all pods | +| securityContext | object | `{}` | Security context override for all containers | +| service.port | int | `50051` | Port to be exposed on the service | +| service.type | string | `"ClusterIP"` | Service type to be used | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | +| serviceAccount.create | bool | `true` | Specifies whether a service account should be created | +| serviceAccount.name | string | `""` | The name of the service account to use. If not set and serviceAccount.create is true, a name is generated using the fullname template | +| tolerations | list | `[]` | Specify the tolerations for all pods | diff --git a/charts/catalog-srv/templates/_helpers.tpl b/charts/catalog-srv/templates/_helpers.tpl new file mode 100644 index 0000000..cbc2327 --- /dev/null +++ b/charts/catalog-srv/templates/_helpers.tpl @@ -0,0 +1,76 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "catalog-srv.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 "catalog-srv.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 "catalog-srv.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "catalog-srv.labels" -}} +helm.sh/chart: {{ include "catalog-srv.chart" . }} +{{ include "catalog-srv.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "catalog-srv.selectorLabels" -}} +app.kubernetes.io/name: {{ include "catalog-srv.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "catalog-srv.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "catalog-srv.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +Create the NODE_ENV variable. +*/}} +{{- define "catalog-srv.nodeEnv" -}} +{{- if .Values.config.name }} +{{- printf "%s:%s" .Values.env.nodeEnv (.Values.config.file | trimPrefix (printf "config_%s_" .Values.env.nodeEnv) | trimSuffix ".json") }} +{{- else if .Values.config.literal }} +{{- printf "%s:override" .Values.env.nodeEnv }} +{{- else }} +{{- printf "%s" .Values.env.nodeEnv }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/catalog-srv/templates/configmap.yaml b/charts/catalog-srv/templates/configmap.yaml new file mode 100644 index 0000000..14ab358 --- /dev/null +++ b/charts/catalog-srv/templates/configmap.yaml @@ -0,0 +1,10 @@ +{{- if .Values.config.literal }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: "{{ include "catalog-srv.fullname" . }}-config" + labels: + {{- include "catalog-srv.labels" . | nindent 4 }} +data: + config_production_override.json: {{ .Values.config.literal | quote }} +{{- end }} \ No newline at end of file diff --git a/charts/catalog-srv/templates/deployment.yaml b/charts/catalog-srv/templates/deployment.yaml new file mode 100644 index 0000000..70bd411 --- /dev/null +++ b/charts/catalog-srv/templates/deployment.yaml @@ -0,0 +1,92 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "catalog-srv.fullname" . }} + labels: + {{- include "catalog-srv.labels" . | nindent 4 }} +spec: +{{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} +{{- end }} + selector: + matchLabels: + {{- include "catalog-srv.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "catalog-srv.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "catalog-srv.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: grpc + containerPort: 50051 + protocol: TCP + env: + - name: NODE_ENV + value: {{ include "catalog-srv.nodeEnv" . }} + {{- if .Values.env.extras }} + {{- toYaml .Values.env.extras | nindent 12 }} + {{- end }} + livenessProbe: + initialDelaySeconds: 10 + periodSeconds: 30 + exec: + command: + - /bin/grpc_health_probe + - -addr=:50051 + readinessProbe: + initialDelaySeconds: 10 + periodSeconds: 15 + exec: + command: + - /bin/grpc_health_probe + - -addr=:50051 + - -service=readiness + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- if or .Values.config.name .Values.config.literal }} + volumeMounts: + - name: config + mountPath: "/home/node/catalog-srv/cfg/config_{{ .Values.env.nodeEnv }}_override.json" + subPath: {{ .Values.config.file | quote }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if or .Values.config.name .Values.config.literal }} + volumes: + - name: config + configMap: + {{- with .Values.config.name }} + name: {{ . | quote }} + {{- end }} + {{- if .Values.config.literal }} + name: "{{ include "catalog-srv.fullname" . }}-config" + {{- end }} + {{- end }} diff --git a/charts/catalog-srv/templates/hpa.yaml b/charts/catalog-srv/templates/hpa.yaml new file mode 100644 index 0000000..89a7be2 --- /dev/null +++ b/charts/catalog-srv/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "catalog-srv.fullname" . }} + labels: + {{- include "catalog-srv.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "catalog-srv.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/charts/catalog-srv/templates/service.yaml b/charts/catalog-srv/templates/service.yaml new file mode 100644 index 0000000..53c39bf --- /dev/null +++ b/charts/catalog-srv/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "catalog-srv.fullname" . }} + labels: + {{- include "catalog-srv.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: grpc + protocol: TCP + name: grpc + selector: + {{- include "catalog-srv.selectorLabels" . | nindent 4 }} diff --git a/charts/catalog-srv/templates/serviceaccount.yaml b/charts/catalog-srv/templates/serviceaccount.yaml new file mode 100644 index 0000000..e5b83e6 --- /dev/null +++ b/charts/catalog-srv/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "catalog-srv.serviceAccountName" . }} + labels: + {{- include "catalog-srv.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/catalog-srv/values.yaml b/charts/catalog-srv/values.yaml new file mode 100644 index 0000000..a8ab01b --- /dev/null +++ b/charts/catalog-srv/values.yaml @@ -0,0 +1,111 @@ +# Default values for catalog-srv. + +# replicaCount -- Replica count of the deployment +replicaCount: 1 + +image: + # image.repository -- Image to be used for deployment + repository: restorecommerce/catalog-srv + + # image.pullPolicy -- Pull policy of the deployment + pullPolicy: Always + + # image.tag -- Image tag + tag: 0.0.3 + +# imagePullSecrets -- List of secrets for images +imagePullSecrets: [] + +# nameOverride -- Name override for all resources +nameOverride: "" + +# fullnameOverride -- Full name override for all resources +fullnameOverride: "" + +serviceAccount: + # serviceAccount.create -- Specifies whether a service account should be created + create: true + + # serviceAccount.annotations -- Annotations to add to the service account + annotations: {} + + # serviceAccount.name -- The name of the service account to use. + # If not set and serviceAccount.create is true, a name is generated using the fullname template + name: "" + +# podAnnotations -- Any extra annotations for all pods +podAnnotations: {} + +# podSecurityContext -- Security context override for all pods +podSecurityContext: {} + # fsGroup: 2000 + +# securityContext -- Security context override for all containers +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + # service.type -- Service type to be used + type: ClusterIP + + # service.port -- Port to be exposed on the service + port: 50051 + +# resources -- Any resource configuration applied to all pods +resources: {} + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +autoscaling: + # autoscaling.enabled -- Enable HPA + enabled: false + + # autoscaling.minReplicas -- Min amount of replicas for HPA + minReplicas: 1 + + # autoscaling.maxReplicas -- Max amount of replicas for HPA + maxReplicas: 100 + + # autoscaling.targetCPUUtilizationPercentage -- Target CPU usage for HPA + targetCPUUtilizationPercentage: 80 + + # autoscaling.targetMemoryUtilizationPercentage -- Target memory usage for HPA + targetMemoryUtilizationPercentage: 80 + +# nodeSelector -- Specify the nodeSelector for all pods +nodeSelector: {} + +# tolerations -- Specify the tolerations for all pods +tolerations: [] + +# affinity -- Specify the affinity for all pods +affinity: {} + +env: + # env.nodeEnv -- The selected node environment and config + nodeEnv: production + + # env.extras -- Any extra environment variables appended to all pods + extras: [] + +# Override the config of the container +config: + # config.name -- Name of the config map to be mounted. + # If specified, config will be appended to the node environment automatically + name: "" + + # config.file -- Name of the file in the config map + file: "config_production_override.json" + + # config.literal -- Provide the literal config through this string. + # Has to be in a JSON format + literal: "" diff --git a/charts/console/Chart.yaml b/charts/console/Chart.yaml index a72c2aa..434460c 100644 --- a/charts/console/Chart.yaml +++ b/charts/console/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: console description: A Helm chart for restorecommerce console type: application -version: 0.1.0 +version: 0.1.1 appVersion: 0.1.0 icon: https://avatars0.githubusercontent.com/u/8339525 sources: diff --git a/charts/console/README.md b/charts/console/README.md index 2fe2238..2d6cdb3 100644 --- a/charts/console/README.md +++ b/charts/console/README.md @@ -1,6 +1,6 @@ # console -![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) +![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-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) A Helm chart for restorecommerce console @@ -27,7 +27,7 @@ A Helm chart for restorecommerce console | env.extras | list | `[]` | Any extra environment variables appended to all pods | | env.nodeEnv | string | `"production"` | The selected node environment and config | | fullnameOverride | string | `""` | Full name override for all resources | -| image.pullPolicy | string | `"IfNotPresent"` | Pull policy of the deployment | +| image.pullPolicy | string | `"Always"` | Pull policy of the deployment | | image.repository | string | `"restorecommerce/console"` | Image to be used for deployment | | image.tag | string | `"0.1.0"` | Image tag | | imagePullSecrets | list | `[]` | List of secrets for images | diff --git a/charts/console/values.yaml b/charts/console/values.yaml index 66dc638..3d2b602 100644 --- a/charts/console/values.yaml +++ b/charts/console/values.yaml @@ -8,7 +8,7 @@ image: repository: restorecommerce/console # image.pullPolicy -- Pull policy of the deployment - pullPolicy: IfNotPresent + pullPolicy: Always # image.tag -- Image tag tag: 0.1.0 diff --git a/charts/fulfillment-srv/.helmignore b/charts/fulfillment-srv/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/fulfillment-srv/.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/fulfillment-srv/Chart.yaml b/charts/fulfillment-srv/Chart.yaml new file mode 100644 index 0000000..ba9e22c --- /dev/null +++ b/charts/fulfillment-srv/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v2 +name: fulfillment-srv +description: A Helm chart for restorecommerce fulfillment-srv +type: application +version: 0.1.0 +appVersion: 0.0.17 +icon: https://avatars0.githubusercontent.com/u/8339525 +home: https://docs.restorecommerce.io/fulfillment-srv/index.html +sources: + - https://github.com/restorecommerce/fulfillment-srv +maintainers: + - name: restorecommerce + url: https://restorecommerce.io/ + email: info@restorecommerce.io diff --git a/charts/fulfillment-srv/README.md b/charts/fulfillment-srv/README.md new file mode 100644 index 0000000..84ebc5e --- /dev/null +++ b/charts/fulfillment-srv/README.md @@ -0,0 +1,51 @@ +# fulfillment-srv + +![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.0.17](https://img.shields.io/badge/AppVersion-0.0.17-informational?style=flat-square) + +A Helm chart for restorecommerce fulfillment-srv + +**Homepage:** + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| restorecommerce | info@restorecommerce.io | https://restorecommerce.io/ | + +## Source Code + +* + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | Specify the affinity for all pods | +| autoscaling.enabled | bool | `false` | Enable HPA | +| autoscaling.maxReplicas | int | `100` | Max amount of replicas for HPA | +| autoscaling.minReplicas | int | `1` | Min amount of replicas for HPA | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU usage for HPA | +| autoscaling.targetMemoryUtilizationPercentage | int | `80` | Target memory usage for HPA | +| config.file | string | `"config_production_override.json"` | Name of the file in the config map | +| config.literal | string | `""` | Provide the literal config through this string. Has to be in a JSON format | +| config.name | string | `""` | Name of the config map to be mounted. If specified, config will be appended to the node environment automatically | +| env.extras | list | `[]` | Any extra environment variables appended to all pods | +| env.nodeEnv | string | `"production"` | The selected node environment and config | +| fullnameOverride | string | `""` | Full name override for all resources | +| image.pullPolicy | string | `"Always"` | Pull policy of the deployment | +| image.repository | string | `"restorecommerce/fulfillment-srv"` | Image to be used for deployment | +| image.tag | string | `"0.0.17"` | Image tag | +| imagePullSecrets | list | `[]` | List of secrets for images | +| nameOverride | string | `""` | Name override for all resources | +| nodeSelector | object | `{}` | Specify the nodeSelector for all pods | +| podAnnotations | object | `{}` | Any extra annotations for all pods | +| podSecurityContext | object | `{}` | Security context override for all pods | +| replicaCount | int | `1` | Replica count of the deployment | +| resources | object | `{}` | Any resource configuration applied to all pods | +| securityContext | object | `{}` | Security context override for all containers | +| service.port | int | `50051` | Port to be exposed on the service | +| service.type | string | `"ClusterIP"` | Service type to be used | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | +| serviceAccount.create | bool | `true` | Specifies whether a service account should be created | +| serviceAccount.name | string | `""` | The name of the service account to use. If not set and serviceAccount.create is true, a name is generated using the fullname template | +| tolerations | list | `[]` | Specify the tolerations for all pods | diff --git a/charts/fulfillment-srv/templates/_helpers.tpl b/charts/fulfillment-srv/templates/_helpers.tpl new file mode 100644 index 0000000..49349f6 --- /dev/null +++ b/charts/fulfillment-srv/templates/_helpers.tpl @@ -0,0 +1,76 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "fulfillment-srv.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 "fulfillment-srv.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 "fulfillment-srv.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "fulfillment-srv.labels" -}} +helm.sh/chart: {{ include "fulfillment-srv.chart" . }} +{{ include "fulfillment-srv.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "fulfillment-srv.selectorLabels" -}} +app.kubernetes.io/name: {{ include "fulfillment-srv.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "fulfillment-srv.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "fulfillment-srv.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +Create the NODE_ENV variable. +*/}} +{{- define "fulfillment-srv.nodeEnv" -}} +{{- if .Values.config.name }} +{{- printf "%s:%s" .Values.env.nodeEnv (.Values.config.file | trimPrefix (printf "config_%s_" .Values.env.nodeEnv) | trimSuffix ".json") }} +{{- else if .Values.config.literal }} +{{- printf "%s:override" .Values.env.nodeEnv }} +{{- else }} +{{- printf "%s" .Values.env.nodeEnv }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/fulfillment-srv/templates/configmap.yaml b/charts/fulfillment-srv/templates/configmap.yaml new file mode 100644 index 0000000..6951913 --- /dev/null +++ b/charts/fulfillment-srv/templates/configmap.yaml @@ -0,0 +1,10 @@ +{{- if .Values.config.literal }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: "{{ include "fulfillment-srv.fullname" . }}-config" + labels: + {{- include "fulfillment-srv.labels" . | nindent 4 }} +data: + config_production_override.json: {{ .Values.config.literal | quote }} +{{- end }} \ No newline at end of file diff --git a/charts/fulfillment-srv/templates/deployment.yaml b/charts/fulfillment-srv/templates/deployment.yaml new file mode 100644 index 0000000..c67f347 --- /dev/null +++ b/charts/fulfillment-srv/templates/deployment.yaml @@ -0,0 +1,92 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "fulfillment-srv.fullname" . }} + labels: + {{- include "fulfillment-srv.labels" . | nindent 4 }} +spec: +{{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} +{{- end }} + selector: + matchLabels: + {{- include "fulfillment-srv.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "fulfillment-srv.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "fulfillment-srv.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: grpc + containerPort: 50051 + protocol: TCP + env: + - name: NODE_ENV + value: {{ include "fulfillment-srv.nodeEnv" . }} + {{- if .Values.env.extras }} + {{- toYaml .Values.env.extras | nindent 12 }} + {{- end }} + livenessProbe: + initialDelaySeconds: 10 + periodSeconds: 30 + exec: + command: + - /bin/grpc_health_probe + - -addr=:50051 + readinessProbe: + initialDelaySeconds: 10 + periodSeconds: 15 + exec: + command: + - /bin/grpc_health_probe + - -addr=:50051 + - -service=readiness + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- if or .Values.config.name .Values.config.literal }} + volumeMounts: + - name: config + mountPath: "/home/node/fulfillment-srv/cfg/config_{{ .Values.env.nodeEnv }}_override.json" + subPath: {{ .Values.config.file | quote }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if or .Values.config.name .Values.config.literal }} + volumes: + - name: config + configMap: + {{- with .Values.config.name }} + name: {{ . | quote }} + {{- end }} + {{- if .Values.config.literal }} + name: "{{ include "fulfillment-srv.fullname" . }}-config" + {{- end }} + {{- end }} diff --git a/charts/fulfillment-srv/templates/hpa.yaml b/charts/fulfillment-srv/templates/hpa.yaml new file mode 100644 index 0000000..6d2a4e5 --- /dev/null +++ b/charts/fulfillment-srv/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "fulfillment-srv.fullname" . }} + labels: + {{- include "fulfillment-srv.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "fulfillment-srv.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/charts/fulfillment-srv/templates/service.yaml b/charts/fulfillment-srv/templates/service.yaml new file mode 100644 index 0000000..887ea0f --- /dev/null +++ b/charts/fulfillment-srv/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "fulfillment-srv.fullname" . }} + labels: + {{- include "fulfillment-srv.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: grpc + protocol: TCP + name: grpc + selector: + {{- include "fulfillment-srv.selectorLabels" . | nindent 4 }} diff --git a/charts/fulfillment-srv/templates/serviceaccount.yaml b/charts/fulfillment-srv/templates/serviceaccount.yaml new file mode 100644 index 0000000..a3ef88c --- /dev/null +++ b/charts/fulfillment-srv/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "fulfillment-srv.serviceAccountName" . }} + labels: + {{- include "fulfillment-srv.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/fulfillment-srv/values.yaml b/charts/fulfillment-srv/values.yaml new file mode 100644 index 0000000..b15571d --- /dev/null +++ b/charts/fulfillment-srv/values.yaml @@ -0,0 +1,111 @@ +# Default values for fulfillment-srv. + +# replicaCount -- Replica count of the deployment +replicaCount: 1 + +image: + # image.repository -- Image to be used for deployment + repository: restorecommerce/fulfillment-srv + + # image.pullPolicy -- Pull policy of the deployment + pullPolicy: Always + + # image.tag -- Image tag + tag: 0.0.17 + +# imagePullSecrets -- List of secrets for images +imagePullSecrets: [] + +# nameOverride -- Name override for all resources +nameOverride: "" + +# fullnameOverride -- Full name override for all resources +fullnameOverride: "" + +serviceAccount: + # serviceAccount.create -- Specifies whether a service account should be created + create: true + + # serviceAccount.annotations -- Annotations to add to the service account + annotations: {} + + # serviceAccount.name -- The name of the service account to use. + # If not set and serviceAccount.create is true, a name is generated using the fullname template + name: "" + +# podAnnotations -- Any extra annotations for all pods +podAnnotations: {} + +# podSecurityContext -- Security context override for all pods +podSecurityContext: {} + # fsGroup: 2000 + +# securityContext -- Security context override for all containers +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + # service.type -- Service type to be used + type: ClusterIP + + # service.port -- Port to be exposed on the service + port: 50051 + +# resources -- Any resource configuration applied to all pods +resources: {} + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +autoscaling: + # autoscaling.enabled -- Enable HPA + enabled: false + + # autoscaling.minReplicas -- Min amount of replicas for HPA + minReplicas: 1 + + # autoscaling.maxReplicas -- Max amount of replicas for HPA + maxReplicas: 100 + + # autoscaling.targetCPUUtilizationPercentage -- Target CPU usage for HPA + targetCPUUtilizationPercentage: 80 + + # autoscaling.targetMemoryUtilizationPercentage -- Target memory usage for HPA + targetMemoryUtilizationPercentage: 80 + +# nodeSelector -- Specify the nodeSelector for all pods +nodeSelector: {} + +# tolerations -- Specify the tolerations for all pods +tolerations: [] + +# affinity -- Specify the affinity for all pods +affinity: {} + +env: + # env.nodeEnv -- The selected node environment and config + nodeEnv: production + + # env.extras -- Any extra environment variables appended to all pods + extras: [] + +# Override the config of the container +config: + # config.name -- Name of the config map to be mounted. + # If specified, config will be appended to the node environment automatically + name: "" + + # config.file -- Name of the file in the config map + file: "config_production_override.json" + + # config.literal -- Provide the literal config through this string. + # Has to be in a JSON format + literal: "" diff --git a/charts/identity-srv/Chart.yaml b/charts/identity-srv/Chart.yaml index d159e67..d49adba 100644 --- a/charts/identity-srv/Chart.yaml +++ b/charts/identity-srv/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: identity-srv description: A Helm chart for restorecommerce identity-srv type: application -version: 0.1.2 -appVersion: 0.1.9 +version: 0.1.3 +appVersion: 0.1.12 icon: https://avatars0.githubusercontent.com/u/8339525 home: https://docs.restorecommerce.io/identity-srv/index.html sources: diff --git a/charts/identity-srv/README.md b/charts/identity-srv/README.md index d955fd4..13c3766 100644 --- a/charts/identity-srv/README.md +++ b/charts/identity-srv/README.md @@ -1,6 +1,6 @@ # identity-srv -![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.9](https://img.shields.io/badge/AppVersion-0.1.9-informational?style=flat-square) +![Version: 0.1.3](https://img.shields.io/badge/Version-0.1.3-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.12](https://img.shields.io/badge/AppVersion-0.1.12-informational?style=flat-square) A Helm chart for restorecommerce identity-srv @@ -32,9 +32,9 @@ A Helm chart for restorecommerce identity-srv | env.extras | list | `[]` | Any extra environment variables appended to all pods | | env.nodeEnv | string | `"production"` | The selected node environment and config | | fullnameOverride | string | `""` | Full name override for all resources | -| image.pullPolicy | string | `"IfNotPresent"` | Pull policy of the deployment | +| image.pullPolicy | string | `"Always"` | Pull policy of the deployment | | image.repository | string | `"restorecommerce/identity-srv"` | Image to be used for deployment | -| image.tag | string | `"0.1.9"` | Image tag | +| image.tag | string | `"0.1.12"` | Image tag | | imagePullSecrets | list | `[]` | List of secrets for images | | nameOverride | string | `""` | Name override for all resources | | nodeSelector | object | `{}` | Specify the nodeSelector for all pods | diff --git a/charts/identity-srv/values.yaml b/charts/identity-srv/values.yaml index 56b677c..5942682 100644 --- a/charts/identity-srv/values.yaml +++ b/charts/identity-srv/values.yaml @@ -8,10 +8,10 @@ image: repository: restorecommerce/identity-srv # image.pullPolicy -- Pull policy of the deployment - pullPolicy: IfNotPresent + pullPolicy: Always # image.tag -- Image tag - tag: 0.1.9 + tag: 0.1.12 # imagePullSecrets -- List of secrets for images imagePullSecrets: [] diff --git a/charts/indexing-srv/.helmignore b/charts/indexing-srv/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/indexing-srv/.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/indexing-srv/Chart.yaml b/charts/indexing-srv/Chart.yaml new file mode 100644 index 0000000..743e334 --- /dev/null +++ b/charts/indexing-srv/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v2 +name: indexing-srv +description: A Helm chart for restorecommerce indexing-srv +type: application +version: 0.1.0 +appVersion: 0.0.13 +icon: https://avatars0.githubusercontent.com/u/8339525 +home: https://docs.restorecommerce.io/indexing-srv/index.html +sources: + - https://github.com/restorecommerce/indexing-srv +maintainers: + - name: restorecommerce + url: https://restorecommerce.io/ + email: info@restorecommerce.io diff --git a/charts/indexing-srv/README.md b/charts/indexing-srv/README.md new file mode 100644 index 0000000..f2b32a8 --- /dev/null +++ b/charts/indexing-srv/README.md @@ -0,0 +1,51 @@ +# indexing-srv + +![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.0.13](https://img.shields.io/badge/AppVersion-0.0.13-informational?style=flat-square) + +A Helm chart for restorecommerce indexing-srv + +**Homepage:** + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| restorecommerce | info@restorecommerce.io | https://restorecommerce.io/ | + +## Source Code + +* + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | Specify the affinity for all pods | +| autoscaling.enabled | bool | `false` | Enable HPA | +| autoscaling.maxReplicas | int | `100` | Max amount of replicas for HPA | +| autoscaling.minReplicas | int | `1` | Min amount of replicas for HPA | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU usage for HPA | +| autoscaling.targetMemoryUtilizationPercentage | int | `80` | Target memory usage for HPA | +| config.file | string | `"config_production_override.json"` | Name of the file in the config map | +| config.literal | string | `""` | Provide the literal config through this string. Has to be in a JSON format | +| config.name | string | `""` | Name of the config map to be mounted. If specified, config will be appended to the node environment automatically | +| env.extras | list | `[]` | Any extra environment variables appended to all pods | +| env.nodeEnv | string | `"production"` | The selected node environment and config | +| fullnameOverride | string | `""` | Full name override for all resources | +| image.pullPolicy | string | `"Always"` | Pull policy of the deployment | +| image.repository | string | `"restorecommerce/indexing-srv"` | Image to be used for deployment | +| image.tag | string | `"0.0.13"` | Image tag | +| imagePullSecrets | list | `[]` | List of secrets for images | +| nameOverride | string | `""` | Name override for all resources | +| nodeSelector | object | `{}` | Specify the nodeSelector for all pods | +| podAnnotations | object | `{}` | Any extra annotations for all pods | +| podSecurityContext | object | `{}` | Security context override for all pods | +| replicaCount | int | `1` | Replica count of the deployment | +| resources | object | `{}` | Any resource configuration applied to all pods | +| securityContext | object | `{}` | Security context override for all containers | +| service.port | int | `50051` | Port to be exposed on the service | +| service.type | string | `"ClusterIP"` | Service type to be used | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | +| serviceAccount.create | bool | `true` | Specifies whether a service account should be created | +| serviceAccount.name | string | `""` | The name of the service account to use. If not set and serviceAccount.create is true, a name is generated using the fullname template | +| tolerations | list | `[]` | Specify the tolerations for all pods | diff --git a/charts/indexing-srv/templates/_helpers.tpl b/charts/indexing-srv/templates/_helpers.tpl new file mode 100644 index 0000000..e43b8dc --- /dev/null +++ b/charts/indexing-srv/templates/_helpers.tpl @@ -0,0 +1,76 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "indexing-srv.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 "indexing-srv.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 "indexing-srv.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "indexing-srv.labels" -}} +helm.sh/chart: {{ include "indexing-srv.chart" . }} +{{ include "indexing-srv.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "indexing-srv.selectorLabels" -}} +app.kubernetes.io/name: {{ include "indexing-srv.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "indexing-srv.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "indexing-srv.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +Create the NODE_ENV variable. +*/}} +{{- define "indexing-srv.nodeEnv" -}} +{{- if .Values.config.name }} +{{- printf "%s:%s" .Values.env.nodeEnv (.Values.config.file | trimPrefix (printf "config_%s_" .Values.env.nodeEnv) | trimSuffix ".json") }} +{{- else if .Values.config.literal }} +{{- printf "%s:override" .Values.env.nodeEnv }} +{{- else }} +{{- printf "%s" .Values.env.nodeEnv }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/indexing-srv/templates/configmap.yaml b/charts/indexing-srv/templates/configmap.yaml new file mode 100644 index 0000000..d2035a5 --- /dev/null +++ b/charts/indexing-srv/templates/configmap.yaml @@ -0,0 +1,10 @@ +{{- if .Values.config.literal }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: "{{ include "indexing-srv.fullname" . }}-config" + labels: + {{- include "indexing-srv.labels" . | nindent 4 }} +data: + config_production_override.json: {{ .Values.config.literal | quote }} +{{- end }} \ No newline at end of file diff --git a/charts/indexing-srv/templates/deployment.yaml b/charts/indexing-srv/templates/deployment.yaml new file mode 100644 index 0000000..34f3d4e --- /dev/null +++ b/charts/indexing-srv/templates/deployment.yaml @@ -0,0 +1,92 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "indexing-srv.fullname" . }} + labels: + {{- include "indexing-srv.labels" . | nindent 4 }} +spec: +{{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} +{{- end }} + selector: + matchLabels: + {{- include "indexing-srv.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "indexing-srv.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "indexing-srv.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: grpc + containerPort: 50051 + protocol: TCP + env: + - name: NODE_ENV + value: {{ include "indexing-srv.nodeEnv" . }} + {{- if .Values.env.extras }} + {{- toYaml .Values.env.extras | nindent 12 }} + {{- end }} + livenessProbe: + initialDelaySeconds: 10 + periodSeconds: 30 + exec: + command: + - /bin/grpc_health_probe + - -addr=:50051 + readinessProbe: + initialDelaySeconds: 10 + periodSeconds: 15 + exec: + command: + - /bin/grpc_health_probe + - -addr=:50051 + - -service=readiness + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- if or .Values.config.name .Values.config.literal }} + volumeMounts: + - name: config + mountPath: "/home/node/indexing-srv/cfg/config_{{ .Values.env.nodeEnv }}_override.json" + subPath: {{ .Values.config.file | quote }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if or .Values.config.name .Values.config.literal }} + volumes: + - name: config + configMap: + {{- with .Values.config.name }} + name: {{ . | quote }} + {{- end }} + {{- if .Values.config.literal }} + name: "{{ include "indexing-srv.fullname" . }}-config" + {{- end }} + {{- end }} diff --git a/charts/indexing-srv/templates/hpa.yaml b/charts/indexing-srv/templates/hpa.yaml new file mode 100644 index 0000000..ffa347b --- /dev/null +++ b/charts/indexing-srv/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "indexing-srv.fullname" . }} + labels: + {{- include "indexing-srv.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "indexing-srv.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/charts/indexing-srv/templates/service.yaml b/charts/indexing-srv/templates/service.yaml new file mode 100644 index 0000000..3a9c795 --- /dev/null +++ b/charts/indexing-srv/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "indexing-srv.fullname" . }} + labels: + {{- include "indexing-srv.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: grpc + protocol: TCP + name: grpc + selector: + {{- include "indexing-srv.selectorLabels" . | nindent 4 }} diff --git a/charts/indexing-srv/templates/serviceaccount.yaml b/charts/indexing-srv/templates/serviceaccount.yaml new file mode 100644 index 0000000..e23f3d3 --- /dev/null +++ b/charts/indexing-srv/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "indexing-srv.serviceAccountName" . }} + labels: + {{- include "indexing-srv.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/indexing-srv/values.yaml b/charts/indexing-srv/values.yaml new file mode 100644 index 0000000..b16ea6a --- /dev/null +++ b/charts/indexing-srv/values.yaml @@ -0,0 +1,111 @@ +# Default values for indexing-srv. + +# replicaCount -- Replica count of the deployment +replicaCount: 1 + +image: + # image.repository -- Image to be used for deployment + repository: restorecommerce/indexing-srv + + # image.pullPolicy -- Pull policy of the deployment + pullPolicy: Always + + # image.tag -- Image tag + tag: 0.0.13 + +# imagePullSecrets -- List of secrets for images +imagePullSecrets: [] + +# nameOverride -- Name override for all resources +nameOverride: "" + +# fullnameOverride -- Full name override for all resources +fullnameOverride: "" + +serviceAccount: + # serviceAccount.create -- Specifies whether a service account should be created + create: true + + # serviceAccount.annotations -- Annotations to add to the service account + annotations: {} + + # serviceAccount.name -- The name of the service account to use. + # If not set and serviceAccount.create is true, a name is generated using the fullname template + name: "" + +# podAnnotations -- Any extra annotations for all pods +podAnnotations: {} + +# podSecurityContext -- Security context override for all pods +podSecurityContext: {} + # fsGroup: 2000 + +# securityContext -- Security context override for all containers +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + # service.type -- Service type to be used + type: ClusterIP + + # service.port -- Port to be exposed on the service + port: 50051 + +# resources -- Any resource configuration applied to all pods +resources: {} + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +autoscaling: + # autoscaling.enabled -- Enable HPA + enabled: false + + # autoscaling.minReplicas -- Min amount of replicas for HPA + minReplicas: 1 + + # autoscaling.maxReplicas -- Max amount of replicas for HPA + maxReplicas: 100 + + # autoscaling.targetCPUUtilizationPercentage -- Target CPU usage for HPA + targetCPUUtilizationPercentage: 80 + + # autoscaling.targetMemoryUtilizationPercentage -- Target memory usage for HPA + targetMemoryUtilizationPercentage: 80 + +# nodeSelector -- Specify the nodeSelector for all pods +nodeSelector: {} + +# tolerations -- Specify the tolerations for all pods +tolerations: [] + +# affinity -- Specify the affinity for all pods +affinity: {} + +env: + # env.nodeEnv -- The selected node environment and config + nodeEnv: production + + # env.extras -- Any extra environment variables appended to all pods + extras: [] + +# Override the config of the container +config: + # config.name -- Name of the config map to be mounted. + # If specified, config will be appended to the node environment automatically + name: "" + + # config.file -- Name of the file in the config map + file: "config_production_override.json" + + # config.literal -- Provide the literal config through this string. + # Has to be in a JSON format + literal: "" diff --git a/charts/invoicing-srv/.helmignore b/charts/invoicing-srv/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/invoicing-srv/.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/invoicing-srv/Chart.yaml b/charts/invoicing-srv/Chart.yaml new file mode 100644 index 0000000..87e12c5 --- /dev/null +++ b/charts/invoicing-srv/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v2 +name: invoicing-srv +description: A Helm chart for restorecommerce invoicing-srv +type: application +version: 0.1.0 +appVersion: 0.0.8 +icon: https://avatars0.githubusercontent.com/u/8339525 +home: https://docs.restorecommerce.io/invoicing-srv/index.html +sources: + - https://github.com/restorecommerce/invoicing-srv +maintainers: + - name: restorecommerce + url: https://restorecommerce.io/ + email: info@restorecommerce.io diff --git a/charts/invoicing-srv/README.md b/charts/invoicing-srv/README.md new file mode 100644 index 0000000..e8d9a57 --- /dev/null +++ b/charts/invoicing-srv/README.md @@ -0,0 +1,51 @@ +# invoicing-srv + +![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.0.8](https://img.shields.io/badge/AppVersion-0.0.8-informational?style=flat-square) + +A Helm chart for restorecommerce invoicing-srv + +**Homepage:** + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| restorecommerce | info@restorecommerce.io | https://restorecommerce.io/ | + +## Source Code + +* + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | Specify the affinity for all pods | +| autoscaling.enabled | bool | `false` | Enable HPA | +| autoscaling.maxReplicas | int | `100` | Max amount of replicas for HPA | +| autoscaling.minReplicas | int | `1` | Min amount of replicas for HPA | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU usage for HPA | +| autoscaling.targetMemoryUtilizationPercentage | int | `80` | Target memory usage for HPA | +| config.file | string | `"config_production_override.json"` | Name of the file in the config map | +| config.literal | string | `""` | Provide the literal config through this string. Has to be in a JSON format | +| config.name | string | `""` | Name of the config map to be mounted. If specified, config will be appended to the node environment automatically | +| env.extras | list | `[]` | Any extra environment variables appended to all pods | +| env.nodeEnv | string | `"production"` | The selected node environment and config | +| fullnameOverride | string | `""` | Full name override for all resources | +| image.pullPolicy | string | `"Always"` | Pull policy of the deployment | +| image.repository | string | `"restorecommerce/invoicing-srv"` | Image to be used for deployment | +| image.tag | string | `"0.0.8"` | Image tag | +| imagePullSecrets | list | `[]` | List of secrets for images | +| nameOverride | string | `""` | Name override for all resources | +| nodeSelector | object | `{}` | Specify the nodeSelector for all pods | +| podAnnotations | object | `{}` | Any extra annotations for all pods | +| podSecurityContext | object | `{}` | Security context override for all pods | +| replicaCount | int | `1` | Replica count of the deployment | +| resources | object | `{}` | Any resource configuration applied to all pods | +| securityContext | object | `{}` | Security context override for all containers | +| service.port | int | `50051` | Port to be exposed on the service | +| service.type | string | `"ClusterIP"` | Service type to be used | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | +| serviceAccount.create | bool | `true` | Specifies whether a service account should be created | +| serviceAccount.name | string | `""` | The name of the service account to use. If not set and serviceAccount.create is true, a name is generated using the fullname template | +| tolerations | list | `[]` | Specify the tolerations for all pods | diff --git a/charts/invoicing-srv/templates/_helpers.tpl b/charts/invoicing-srv/templates/_helpers.tpl new file mode 100644 index 0000000..922d30f --- /dev/null +++ b/charts/invoicing-srv/templates/_helpers.tpl @@ -0,0 +1,76 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "invoicing-srv.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 "invoicing-srv.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 "invoicing-srv.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "invoicing-srv.labels" -}} +helm.sh/chart: {{ include "invoicing-srv.chart" . }} +{{ include "invoicing-srv.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "invoicing-srv.selectorLabels" -}} +app.kubernetes.io/name: {{ include "invoicing-srv.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "invoicing-srv.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "invoicing-srv.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +Create the NODE_ENV variable. +*/}} +{{- define "invoicing-srv.nodeEnv" -}} +{{- if .Values.config.name }} +{{- printf "%s:%s" .Values.env.nodeEnv (.Values.config.file | trimPrefix (printf "config_%s_" .Values.env.nodeEnv) | trimSuffix ".json") }} +{{- else if .Values.config.literal }} +{{- printf "%s:override" .Values.env.nodeEnv }} +{{- else }} +{{- printf "%s" .Values.env.nodeEnv }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/invoicing-srv/templates/configmap.yaml b/charts/invoicing-srv/templates/configmap.yaml new file mode 100644 index 0000000..0688018 --- /dev/null +++ b/charts/invoicing-srv/templates/configmap.yaml @@ -0,0 +1,10 @@ +{{- if .Values.config.literal }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: "{{ include "invoicing-srv.fullname" . }}-config" + labels: + {{- include "invoicing-srv.labels" . | nindent 4 }} +data: + config_production_override.json: {{ .Values.config.literal | quote }} +{{- end }} \ No newline at end of file diff --git a/charts/invoicing-srv/templates/deployment.yaml b/charts/invoicing-srv/templates/deployment.yaml new file mode 100644 index 0000000..85f8161 --- /dev/null +++ b/charts/invoicing-srv/templates/deployment.yaml @@ -0,0 +1,92 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "invoicing-srv.fullname" . }} + labels: + {{- include "invoicing-srv.labels" . | nindent 4 }} +spec: +{{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} +{{- end }} + selector: + matchLabels: + {{- include "invoicing-srv.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "invoicing-srv.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "invoicing-srv.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: grpc + containerPort: 50051 + protocol: TCP + env: + - name: NODE_ENV + value: {{ include "invoicing-srv.nodeEnv" . }} + {{- if .Values.env.extras }} + {{- toYaml .Values.env.extras | nindent 12 }} + {{- end }} + livenessProbe: + initialDelaySeconds: 10 + periodSeconds: 30 + exec: + command: + - /bin/grpc_health_probe + - -addr=:50051 + readinessProbe: + initialDelaySeconds: 10 + periodSeconds: 15 + exec: + command: + - /bin/grpc_health_probe + - -addr=:50051 + - -service=readiness + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- if or .Values.config.name .Values.config.literal }} + volumeMounts: + - name: config + mountPath: "/home/node/invoicing-srv/cfg/config_{{ .Values.env.nodeEnv }}_override.json" + subPath: {{ .Values.config.file | quote }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if or .Values.config.name .Values.config.literal }} + volumes: + - name: config + configMap: + {{- with .Values.config.name }} + name: {{ . | quote }} + {{- end }} + {{- if .Values.config.literal }} + name: "{{ include "invoicing-srv.fullname" . }}-config" + {{- end }} + {{- end }} diff --git a/charts/invoicing-srv/templates/hpa.yaml b/charts/invoicing-srv/templates/hpa.yaml new file mode 100644 index 0000000..8b87979 --- /dev/null +++ b/charts/invoicing-srv/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "invoicing-srv.fullname" . }} + labels: + {{- include "invoicing-srv.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "invoicing-srv.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/charts/invoicing-srv/templates/service.yaml b/charts/invoicing-srv/templates/service.yaml new file mode 100644 index 0000000..955baee --- /dev/null +++ b/charts/invoicing-srv/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "invoicing-srv.fullname" . }} + labels: + {{- include "invoicing-srv.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: grpc + protocol: TCP + name: grpc + selector: + {{- include "invoicing-srv.selectorLabels" . | nindent 4 }} diff --git a/charts/invoicing-srv/templates/serviceaccount.yaml b/charts/invoicing-srv/templates/serviceaccount.yaml new file mode 100644 index 0000000..cab04a8 --- /dev/null +++ b/charts/invoicing-srv/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "invoicing-srv.serviceAccountName" . }} + labels: + {{- include "invoicing-srv.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/invoicing-srv/values.yaml b/charts/invoicing-srv/values.yaml new file mode 100644 index 0000000..ca85de3 --- /dev/null +++ b/charts/invoicing-srv/values.yaml @@ -0,0 +1,111 @@ +# Default values for invoicing-srv. + +# replicaCount -- Replica count of the deployment +replicaCount: 1 + +image: + # image.repository -- Image to be used for deployment + repository: restorecommerce/invoicing-srv + + # image.pullPolicy -- Pull policy of the deployment + pullPolicy: Always + + # image.tag -- Image tag + tag: 0.0.8 + +# imagePullSecrets -- List of secrets for images +imagePullSecrets: [] + +# nameOverride -- Name override for all resources +nameOverride: "" + +# fullnameOverride -- Full name override for all resources +fullnameOverride: "" + +serviceAccount: + # serviceAccount.create -- Specifies whether a service account should be created + create: true + + # serviceAccount.annotations -- Annotations to add to the service account + annotations: {} + + # serviceAccount.name -- The name of the service account to use. + # If not set and serviceAccount.create is true, a name is generated using the fullname template + name: "" + +# podAnnotations -- Any extra annotations for all pods +podAnnotations: {} + +# podSecurityContext -- Security context override for all pods +podSecurityContext: {} + # fsGroup: 2000 + +# securityContext -- Security context override for all containers +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + # service.type -- Service type to be used + type: ClusterIP + + # service.port -- Port to be exposed on the service + port: 50051 + +# resources -- Any resource configuration applied to all pods +resources: {} + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +autoscaling: + # autoscaling.enabled -- Enable HPA + enabled: false + + # autoscaling.minReplicas -- Min amount of replicas for HPA + minReplicas: 1 + + # autoscaling.maxReplicas -- Max amount of replicas for HPA + maxReplicas: 100 + + # autoscaling.targetCPUUtilizationPercentage -- Target CPU usage for HPA + targetCPUUtilizationPercentage: 80 + + # autoscaling.targetMemoryUtilizationPercentage -- Target memory usage for HPA + targetMemoryUtilizationPercentage: 80 + +# nodeSelector -- Specify the nodeSelector for all pods +nodeSelector: {} + +# tolerations -- Specify the tolerations for all pods +tolerations: [] + +# affinity -- Specify the affinity for all pods +affinity: {} + +env: + # env.nodeEnv -- The selected node environment and config + nodeEnv: production + + # env.extras -- Any extra environment variables appended to all pods + extras: [] + +# Override the config of the container +config: + # config.name -- Name of the config map to be mounted. + # If specified, config will be appended to the node environment automatically + name: "" + + # config.file -- Name of the file in the config map + file: "config_production_override.json" + + # config.literal -- Provide the literal config through this string. + # Has to be in a JSON format + literal: "" diff --git a/charts/notification-srv/Chart.yaml b/charts/notification-srv/Chart.yaml index 3e910c0..380018e 100644 --- a/charts/notification-srv/Chart.yaml +++ b/charts/notification-srv/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: notification-srv description: A Helm chart for restorecommerce notification-srv type: application -version: 0.1.1 -appVersion: 0.1.2 +version: 0.1.2 +appVersion: 0.1.5 icon: https://avatars0.githubusercontent.com/u/8339525 home: https://docs.restorecommerce.io/notification-srv/index.html sources: diff --git a/charts/notification-srv/README.md b/charts/notification-srv/README.md index d882ea9..12abb32 100644 --- a/charts/notification-srv/README.md +++ b/charts/notification-srv/README.md @@ -1,6 +1,6 @@ # notification-srv -![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.2](https://img.shields.io/badge/AppVersion-0.1.2-informational?style=flat-square) +![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.5](https://img.shields.io/badge/AppVersion-0.1.5-informational?style=flat-square) A Helm chart for restorecommerce notification-srv @@ -32,9 +32,9 @@ A Helm chart for restorecommerce notification-srv | env.extras | list | `[]` | Any extra environment variables appended to all pods | | env.nodeEnv | string | `"production"` | The selected node environment and config | | fullnameOverride | string | `""` | Full name override for all resources | -| image.pullPolicy | string | `"IfNotPresent"` | Pull policy of the deployment | +| image.pullPolicy | string | `"Always"` | Pull policy of the deployment | | image.repository | string | `"restorecommerce/notification-srv"` | Image to be used for deployment | -| image.tag | string | `"0.1.2"` | Image tag | +| image.tag | string | `"0.1.5"` | Image tag | | imagePullSecrets | list | `[]` | List of secrets for images | | nameOverride | string | `""` | Name override for all resources | | nodeSelector | object | `{}` | Specify the nodeSelector for all pods | diff --git a/charts/notification-srv/templates/deployment.yaml b/charts/notification-srv/templates/deployment.yaml index 82ab1cc..a569b40 100644 --- a/charts/notification-srv/templates/deployment.yaml +++ b/charts/notification-srv/templates/deployment.yaml @@ -49,17 +49,16 @@ spec: periodSeconds: 30 exec: command: - - sh - - -c - - NODE_OPTIONS=--no-deprecation npm run --silent healthcheck + - /bin/grpc_health_probe + - -addr=:50051 readinessProbe: initialDelaySeconds: 10 - periodSeconds: 30 + periodSeconds: 15 exec: command: - - sh - - -c - - NODE_OPTIONS=--no-deprecation npm run --silent healthcheck + - /bin/grpc_health_probe + - -addr=:50051 + - -service=readiness resources: {{- toYaml .Values.resources | nindent 12 }} {{- if or .Values.config.name .Values.config.literal }} diff --git a/charts/notification-srv/values.yaml b/charts/notification-srv/values.yaml index 737e49e..c4ad198 100644 --- a/charts/notification-srv/values.yaml +++ b/charts/notification-srv/values.yaml @@ -8,10 +8,10 @@ image: repository: restorecommerce/notification-srv # image.pullPolicy -- Pull policy of the deployment - pullPolicy: IfNotPresent + pullPolicy: Always # image.tag -- Image tag - tag: 0.1.2 + tag: 0.1.5 # imagePullSecrets -- List of secrets for images imagePullSecrets: [] diff --git a/charts/ordering-srv/.helmignore b/charts/ordering-srv/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/ordering-srv/.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/ordering-srv/Chart.yaml b/charts/ordering-srv/Chart.yaml new file mode 100644 index 0000000..6321cc5 --- /dev/null +++ b/charts/ordering-srv/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v2 +name: ordering-srv +description: A Helm chart for restorecommerce ordering-srv +type: application +version: 0.1.0 +appVersion: 0.0.3 +icon: https://avatars0.githubusercontent.com/u/8339525 +home: https://docs.restorecommerce.io/ordering-srv/index.html +sources: + - https://github.com/restorecommerce/ordering-srv +maintainers: + - name: restorecommerce + url: https://restorecommerce.io/ + email: info@restorecommerce.io diff --git a/charts/ordering-srv/README.md b/charts/ordering-srv/README.md new file mode 100644 index 0000000..d65d366 --- /dev/null +++ b/charts/ordering-srv/README.md @@ -0,0 +1,51 @@ +# ordering-srv + +![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.0.3](https://img.shields.io/badge/AppVersion-0.0.3-informational?style=flat-square) + +A Helm chart for restorecommerce ordering-srv + +**Homepage:** + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| restorecommerce | info@restorecommerce.io | https://restorecommerce.io/ | + +## Source Code + +* + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | Specify the affinity for all pods | +| autoscaling.enabled | bool | `false` | Enable HPA | +| autoscaling.maxReplicas | int | `100` | Max amount of replicas for HPA | +| autoscaling.minReplicas | int | `1` | Min amount of replicas for HPA | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU usage for HPA | +| autoscaling.targetMemoryUtilizationPercentage | int | `80` | Target memory usage for HPA | +| config.file | string | `"config_production_override.json"` | Name of the file in the config map | +| config.literal | string | `""` | Provide the literal config through this string. Has to be in a JSON format | +| config.name | string | `""` | Name of the config map to be mounted. If specified, config will be appended to the node environment automatically | +| env.extras | list | `[]` | Any extra environment variables appended to all pods | +| env.nodeEnv | string | `"production"` | The selected node environment and config | +| fullnameOverride | string | `""` | Full name override for all resources | +| image.pullPolicy | string | `"Always"` | Pull policy of the deployment | +| image.repository | string | `"restorecommerce/ordering-srv"` | Image to be used for deployment | +| image.tag | string | `"0.0.3"` | Image tag | +| imagePullSecrets | list | `[]` | List of secrets for images | +| nameOverride | string | `""` | Name override for all resources | +| nodeSelector | object | `{}` | Specify the nodeSelector for all pods | +| podAnnotations | object | `{}` | Any extra annotations for all pods | +| podSecurityContext | object | `{}` | Security context override for all pods | +| replicaCount | int | `1` | Replica count of the deployment | +| resources | object | `{}` | Any resource configuration applied to all pods | +| securityContext | object | `{}` | Security context override for all containers | +| service.port | int | `50051` | Port to be exposed on the service | +| service.type | string | `"ClusterIP"` | Service type to be used | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | +| serviceAccount.create | bool | `true` | Specifies whether a service account should be created | +| serviceAccount.name | string | `""` | The name of the service account to use. If not set and serviceAccount.create is true, a name is generated using the fullname template | +| tolerations | list | `[]` | Specify the tolerations for all pods | diff --git a/charts/ordering-srv/templates/_helpers.tpl b/charts/ordering-srv/templates/_helpers.tpl new file mode 100644 index 0000000..abbba80 --- /dev/null +++ b/charts/ordering-srv/templates/_helpers.tpl @@ -0,0 +1,76 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "ordering-srv.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 "ordering-srv.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 "ordering-srv.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "ordering-srv.labels" -}} +helm.sh/chart: {{ include "ordering-srv.chart" . }} +{{ include "ordering-srv.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "ordering-srv.selectorLabels" -}} +app.kubernetes.io/name: {{ include "ordering-srv.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "ordering-srv.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "ordering-srv.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +Create the NODE_ENV variable. +*/}} +{{- define "ordering-srv.nodeEnv" -}} +{{- if .Values.config.name }} +{{- printf "%s:%s" .Values.env.nodeEnv (.Values.config.file | trimPrefix (printf "config_%s_" .Values.env.nodeEnv) | trimSuffix ".json") }} +{{- else if .Values.config.literal }} +{{- printf "%s:override" .Values.env.nodeEnv }} +{{- else }} +{{- printf "%s" .Values.env.nodeEnv }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/ordering-srv/templates/configmap.yaml b/charts/ordering-srv/templates/configmap.yaml new file mode 100644 index 0000000..5dc33b3 --- /dev/null +++ b/charts/ordering-srv/templates/configmap.yaml @@ -0,0 +1,10 @@ +{{- if .Values.config.literal }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: "{{ include "ordering-srv.fullname" . }}-config" + labels: + {{- include "ordering-srv.labels" . | nindent 4 }} +data: + config_production_override.json: {{ .Values.config.literal | quote }} +{{- end }} \ No newline at end of file diff --git a/charts/ordering-srv/templates/deployment.yaml b/charts/ordering-srv/templates/deployment.yaml new file mode 100644 index 0000000..619dbf4 --- /dev/null +++ b/charts/ordering-srv/templates/deployment.yaml @@ -0,0 +1,92 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "ordering-srv.fullname" . }} + labels: + {{- include "ordering-srv.labels" . | nindent 4 }} +spec: +{{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} +{{- end }} + selector: + matchLabels: + {{- include "ordering-srv.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "ordering-srv.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "ordering-srv.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: grpc + containerPort: 50051 + protocol: TCP + env: + - name: NODE_ENV + value: {{ include "ordering-srv.nodeEnv" . }} + {{- if .Values.env.extras }} + {{- toYaml .Values.env.extras | nindent 12 }} + {{- end }} + livenessProbe: + initialDelaySeconds: 10 + periodSeconds: 30 + exec: + command: + - /bin/grpc_health_probe + - -addr=:50051 + readinessProbe: + initialDelaySeconds: 10 + periodSeconds: 15 + exec: + command: + - /bin/grpc_health_probe + - -addr=:50051 + - -service=readiness + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- if or .Values.config.name .Values.config.literal }} + volumeMounts: + - name: config + mountPath: "/home/node/ordering-srv/cfg/config_{{ .Values.env.nodeEnv }}_override.json" + subPath: {{ .Values.config.file | quote }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if or .Values.config.name .Values.config.literal }} + volumes: + - name: config + configMap: + {{- with .Values.config.name }} + name: {{ . | quote }} + {{- end }} + {{- if .Values.config.literal }} + name: "{{ include "ordering-srv.fullname" . }}-config" + {{- end }} + {{- end }} diff --git a/charts/ordering-srv/templates/hpa.yaml b/charts/ordering-srv/templates/hpa.yaml new file mode 100644 index 0000000..fb99b6b --- /dev/null +++ b/charts/ordering-srv/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "ordering-srv.fullname" . }} + labels: + {{- include "ordering-srv.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "ordering-srv.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/charts/ordering-srv/templates/service.yaml b/charts/ordering-srv/templates/service.yaml new file mode 100644 index 0000000..a512825 --- /dev/null +++ b/charts/ordering-srv/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "ordering-srv.fullname" . }} + labels: + {{- include "ordering-srv.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: grpc + protocol: TCP + name: grpc + selector: + {{- include "ordering-srv.selectorLabels" . | nindent 4 }} diff --git a/charts/ordering-srv/templates/serviceaccount.yaml b/charts/ordering-srv/templates/serviceaccount.yaml new file mode 100644 index 0000000..661416a --- /dev/null +++ b/charts/ordering-srv/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "ordering-srv.serviceAccountName" . }} + labels: + {{- include "ordering-srv.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/ordering-srv/values.yaml b/charts/ordering-srv/values.yaml new file mode 100644 index 0000000..d4f8865 --- /dev/null +++ b/charts/ordering-srv/values.yaml @@ -0,0 +1,111 @@ +# Default values for ordering-srv. + +# replicaCount -- Replica count of the deployment +replicaCount: 1 + +image: + # image.repository -- Image to be used for deployment + repository: restorecommerce/ordering-srv + + # image.pullPolicy -- Pull policy of the deployment + pullPolicy: Always + + # image.tag -- Image tag + tag: 0.0.3 + +# imagePullSecrets -- List of secrets for images +imagePullSecrets: [] + +# nameOverride -- Name override for all resources +nameOverride: "" + +# fullnameOverride -- Full name override for all resources +fullnameOverride: "" + +serviceAccount: + # serviceAccount.create -- Specifies whether a service account should be created + create: true + + # serviceAccount.annotations -- Annotations to add to the service account + annotations: {} + + # serviceAccount.name -- The name of the service account to use. + # If not set and serviceAccount.create is true, a name is generated using the fullname template + name: "" + +# podAnnotations -- Any extra annotations for all pods +podAnnotations: {} + +# podSecurityContext -- Security context override for all pods +podSecurityContext: {} + # fsGroup: 2000 + +# securityContext -- Security context override for all containers +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + # service.type -- Service type to be used + type: ClusterIP + + # service.port -- Port to be exposed on the service + port: 50051 + +# resources -- Any resource configuration applied to all pods +resources: {} + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +autoscaling: + # autoscaling.enabled -- Enable HPA + enabled: false + + # autoscaling.minReplicas -- Min amount of replicas for HPA + minReplicas: 1 + + # autoscaling.maxReplicas -- Max amount of replicas for HPA + maxReplicas: 100 + + # autoscaling.targetCPUUtilizationPercentage -- Target CPU usage for HPA + targetCPUUtilizationPercentage: 80 + + # autoscaling.targetMemoryUtilizationPercentage -- Target memory usage for HPA + targetMemoryUtilizationPercentage: 80 + +# nodeSelector -- Specify the nodeSelector for all pods +nodeSelector: {} + +# tolerations -- Specify the tolerations for all pods +tolerations: [] + +# affinity -- Specify the affinity for all pods +affinity: {} + +env: + # env.nodeEnv -- The selected node environment and config + nodeEnv: production + + # env.extras -- Any extra environment variables appended to all pods + extras: [] + +# Override the config of the container +config: + # config.name -- Name of the config map to be mounted. + # If specified, config will be appended to the node environment automatically + name: "" + + # config.file -- Name of the file in the config map + file: "config_production_override.json" + + # config.literal -- Provide the literal config through this string. + # Has to be in a JSON format + literal: "" diff --git a/charts/ostorage-srv/Chart.yaml b/charts/ostorage-srv/Chart.yaml index ad554d5..5799e4b 100644 --- a/charts/ostorage-srv/Chart.yaml +++ b/charts/ostorage-srv/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: ostorage-srv description: A Helm chart for restorecommerce ostorage-srv type: application -version: 0.1.1 -appVersion: 0.1.3 +version: 0.1.2 +appVersion: 0.1.6 icon: https://avatars0.githubusercontent.com/u/8339525 home: https://docs.restorecommerce.io/ostorage-srv/index.html sources: diff --git a/charts/ostorage-srv/README.md b/charts/ostorage-srv/README.md index a332d53..7f55c73 100644 --- a/charts/ostorage-srv/README.md +++ b/charts/ostorage-srv/README.md @@ -1,6 +1,6 @@ # ostorage-srv -![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.3](https://img.shields.io/badge/AppVersion-0.1.3-informational?style=flat-square) +![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.6](https://img.shields.io/badge/AppVersion-0.1.6-informational?style=flat-square) A Helm chart for restorecommerce ostorage-srv @@ -32,9 +32,9 @@ A Helm chart for restorecommerce ostorage-srv | env.extras | list | `[]` | Any extra environment variables appended to all pods | | env.nodeEnv | string | `"production"` | The selected node environment and config | | fullnameOverride | string | `""` | Full name override for all resources | -| image.pullPolicy | string | `"IfNotPresent"` | Pull policy of the deployment | +| image.pullPolicy | string | `"Always"` | Pull policy of the deployment | | image.repository | string | `"restorecommerce/ostorage-srv"` | Image to be used for deployment | -| image.tag | string | `"0.1.3"` | Image tag | +| image.tag | string | `"0.1.6"` | Image tag | | imagePullSecrets | list | `[]` | List of secrets for images | | nameOverride | string | `""` | Name override for all resources | | nodeSelector | object | `{}` | Specify the nodeSelector for all pods | diff --git a/charts/ostorage-srv/templates/deployment.yaml b/charts/ostorage-srv/templates/deployment.yaml index 849a78c..de6cbc5 100644 --- a/charts/ostorage-srv/templates/deployment.yaml +++ b/charts/ostorage-srv/templates/deployment.yaml @@ -49,17 +49,16 @@ spec: periodSeconds: 30 exec: command: - - sh - - -c - - NODE_OPTIONS=--no-deprecation npm run --silent healthcheck + - /bin/grpc_health_probe + - -addr=:50051 readinessProbe: initialDelaySeconds: 10 - periodSeconds: 30 + periodSeconds: 15 exec: command: - - sh - - -c - - NODE_OPTIONS=--no-deprecation npm run --silent healthcheck + - /bin/grpc_health_probe + - -addr=:50051 + - -service=readiness resources: {{- toYaml .Values.resources | nindent 12 }} {{- if or .Values.config.name .Values.config.literal }} diff --git a/charts/ostorage-srv/values.yaml b/charts/ostorage-srv/values.yaml index 22d6e00..6c191d3 100644 --- a/charts/ostorage-srv/values.yaml +++ b/charts/ostorage-srv/values.yaml @@ -8,10 +8,10 @@ image: repository: restorecommerce/ostorage-srv # image.pullPolicy -- Pull policy of the deployment - pullPolicy: IfNotPresent + pullPolicy: Always # image.tag -- Image tag - tag: 0.1.3 + tag: 0.1.6 # imagePullSecrets -- List of secrets for images imagePullSecrets: [] diff --git a/charts/payment-srv/.helmignore b/charts/payment-srv/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/charts/payment-srv/.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/payment-srv/Chart.yaml b/charts/payment-srv/Chart.yaml new file mode 100644 index 0000000..133210b --- /dev/null +++ b/charts/payment-srv/Chart.yaml @@ -0,0 +1,14 @@ +apiVersion: v2 +name: payment-srv +description: A Helm chart for restorecommerce payment-srv +type: application +version: 0.1.0 +appVersion: 0.0.2 +icon: https://avatars0.githubusercontent.com/u/8339525 +home: https://docs.restorecommerce.io/payment-srv/index.html +sources: + - https://github.com/restorecommerce/payment-srv +maintainers: + - name: restorecommerce + url: https://restorecommerce.io/ + email: info@restorecommerce.io diff --git a/charts/payment-srv/README.md b/charts/payment-srv/README.md new file mode 100644 index 0000000..971642f --- /dev/null +++ b/charts/payment-srv/README.md @@ -0,0 +1,51 @@ +# payment-srv + +![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.0.2](https://img.shields.io/badge/AppVersion-0.0.2-informational?style=flat-square) + +A Helm chart for restorecommerce payment-srv + +**Homepage:** + +## Maintainers + +| Name | Email | Url | +| ---- | ------ | --- | +| restorecommerce | info@restorecommerce.io | https://restorecommerce.io/ | + +## Source Code + +* + +## Values + +| Key | Type | Default | Description | +|-----|------|---------|-------------| +| affinity | object | `{}` | Specify the affinity for all pods | +| autoscaling.enabled | bool | `false` | Enable HPA | +| autoscaling.maxReplicas | int | `100` | Max amount of replicas for HPA | +| autoscaling.minReplicas | int | `1` | Min amount of replicas for HPA | +| autoscaling.targetCPUUtilizationPercentage | int | `80` | Target CPU usage for HPA | +| autoscaling.targetMemoryUtilizationPercentage | int | `80` | Target memory usage for HPA | +| config.file | string | `"config_production_override.json"` | Name of the file in the config map | +| config.literal | string | `""` | Provide the literal config through this string. Has to be in a JSON format | +| config.name | string | `""` | Name of the config map to be mounted. If specified, config will be appended to the node environment automatically | +| env.extras | list | `[]` | Any extra environment variables appended to all pods | +| env.nodeEnv | string | `"production"` | The selected node environment and config | +| fullnameOverride | string | `""` | Full name override for all resources | +| image.pullPolicy | string | `"Always"` | Pull policy of the deployment | +| image.repository | string | `"restorecommerce/payment-srv"` | Image to be used for deployment | +| image.tag | string | `"0.0.2"` | Image tag | +| imagePullSecrets | list | `[]` | List of secrets for images | +| nameOverride | string | `""` | Name override for all resources | +| nodeSelector | object | `{}` | Specify the nodeSelector for all pods | +| podAnnotations | object | `{}` | Any extra annotations for all pods | +| podSecurityContext | object | `{}` | Security context override for all pods | +| replicaCount | int | `1` | Replica count of the deployment | +| resources | object | `{}` | Any resource configuration applied to all pods | +| securityContext | object | `{}` | Security context override for all containers | +| service.port | int | `50051` | Port to be exposed on the service | +| service.type | string | `"ClusterIP"` | Service type to be used | +| serviceAccount.annotations | object | `{}` | Annotations to add to the service account | +| serviceAccount.create | bool | `true` | Specifies whether a service account should be created | +| serviceAccount.name | string | `""` | The name of the service account to use. If not set and serviceAccount.create is true, a name is generated using the fullname template | +| tolerations | list | `[]` | Specify the tolerations for all pods | diff --git a/charts/payment-srv/templates/_helpers.tpl b/charts/payment-srv/templates/_helpers.tpl new file mode 100644 index 0000000..fe3dc64 --- /dev/null +++ b/charts/payment-srv/templates/_helpers.tpl @@ -0,0 +1,76 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "payment-srv.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 "payment-srv.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 "payment-srv.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "payment-srv.labels" -}} +helm.sh/chart: {{ include "payment-srv.chart" . }} +{{ include "payment-srv.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "payment-srv.selectorLabels" -}} +app.kubernetes.io/name: {{ include "payment-srv.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "payment-srv.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "payment-srv.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} + +{{/* +Create the NODE_ENV variable. +*/}} +{{- define "payment-srv.nodeEnv" -}} +{{- if .Values.config.name }} +{{- printf "%s:%s" .Values.env.nodeEnv (.Values.config.file | trimPrefix (printf "config_%s_" .Values.env.nodeEnv) | trimSuffix ".json") }} +{{- else if .Values.config.literal }} +{{- printf "%s:override" .Values.env.nodeEnv }} +{{- else }} +{{- printf "%s" .Values.env.nodeEnv }} +{{- end }} +{{- end }} \ No newline at end of file diff --git a/charts/payment-srv/templates/configmap.yaml b/charts/payment-srv/templates/configmap.yaml new file mode 100644 index 0000000..0bd5976 --- /dev/null +++ b/charts/payment-srv/templates/configmap.yaml @@ -0,0 +1,10 @@ +{{- if .Values.config.literal }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: "{{ include "payment-srv.fullname" . }}-config" + labels: + {{- include "payment-srv.labels" . | nindent 4 }} +data: + config_production_override.json: {{ .Values.config.literal | quote }} +{{- end }} \ No newline at end of file diff --git a/charts/payment-srv/templates/deployment.yaml b/charts/payment-srv/templates/deployment.yaml new file mode 100644 index 0000000..ec90a63 --- /dev/null +++ b/charts/payment-srv/templates/deployment.yaml @@ -0,0 +1,92 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "payment-srv.fullname" . }} + labels: + {{- include "payment-srv.labels" . | nindent 4 }} +spec: +{{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} +{{- end }} + selector: + matchLabels: + {{- include "payment-srv.selectorLabels" . | nindent 6 }} + template: + metadata: + annotations: + checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} + {{- with .Values.podAnnotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "payment-srv.selectorLabels" . | nindent 8 }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "payment-srv.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: grpc + containerPort: 50051 + protocol: TCP + env: + - name: NODE_ENV + value: {{ include "payment-srv.nodeEnv" . }} + {{- if .Values.env.extras }} + {{- toYaml .Values.env.extras | nindent 12 }} + {{- end }} + livenessProbe: + initialDelaySeconds: 10 + periodSeconds: 30 + exec: + command: + - /bin/grpc_health_probe + - -addr=:50051 + readinessProbe: + initialDelaySeconds: 10 + periodSeconds: 15 + exec: + command: + - /bin/grpc_health_probe + - -addr=:50051 + - -service=readiness + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- if or .Values.config.name .Values.config.literal }} + volumeMounts: + - name: config + mountPath: "/home/node/payment-srv/cfg/config_{{ .Values.env.nodeEnv }}_override.json" + subPath: {{ .Values.config.file | quote }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if or .Values.config.name .Values.config.literal }} + volumes: + - name: config + configMap: + {{- with .Values.config.name }} + name: {{ . | quote }} + {{- end }} + {{- if .Values.config.literal }} + name: "{{ include "payment-srv.fullname" . }}-config" + {{- end }} + {{- end }} diff --git a/charts/payment-srv/templates/hpa.yaml b/charts/payment-srv/templates/hpa.yaml new file mode 100644 index 0000000..1b64aa2 --- /dev/null +++ b/charts/payment-srv/templates/hpa.yaml @@ -0,0 +1,28 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2beta1 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "payment-srv.fullname" . }} + labels: + {{- include "payment-srv.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "payment-srv.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/charts/payment-srv/templates/service.yaml b/charts/payment-srv/templates/service.yaml new file mode 100644 index 0000000..f7ea76f --- /dev/null +++ b/charts/payment-srv/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "payment-srv.fullname" . }} + labels: + {{- include "payment-srv.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: grpc + protocol: TCP + name: grpc + selector: + {{- include "payment-srv.selectorLabels" . | nindent 4 }} diff --git a/charts/payment-srv/templates/serviceaccount.yaml b/charts/payment-srv/templates/serviceaccount.yaml new file mode 100644 index 0000000..5ed8ca3 --- /dev/null +++ b/charts/payment-srv/templates/serviceaccount.yaml @@ -0,0 +1,12 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "payment-srv.serviceAccountName" . }} + labels: + {{- include "payment-srv.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} diff --git a/charts/payment-srv/values.yaml b/charts/payment-srv/values.yaml new file mode 100644 index 0000000..24337b9 --- /dev/null +++ b/charts/payment-srv/values.yaml @@ -0,0 +1,111 @@ +# Default values for payment-srv. + +# replicaCount -- Replica count of the deployment +replicaCount: 1 + +image: + # image.repository -- Image to be used for deployment + repository: restorecommerce/payment-srv + + # image.pullPolicy -- Pull policy of the deployment + pullPolicy: Always + + # image.tag -- Image tag + tag: 0.0.2 + +# imagePullSecrets -- List of secrets for images +imagePullSecrets: [] + +# nameOverride -- Name override for all resources +nameOverride: "" + +# fullnameOverride -- Full name override for all resources +fullnameOverride: "" + +serviceAccount: + # serviceAccount.create -- Specifies whether a service account should be created + create: true + + # serviceAccount.annotations -- Annotations to add to the service account + annotations: {} + + # serviceAccount.name -- The name of the service account to use. + # If not set and serviceAccount.create is true, a name is generated using the fullname template + name: "" + +# podAnnotations -- Any extra annotations for all pods +podAnnotations: {} + +# podSecurityContext -- Security context override for all pods +podSecurityContext: {} + # fsGroup: 2000 + +# securityContext -- Security context override for all containers +securityContext: {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + # service.type -- Service type to be used + type: ClusterIP + + # service.port -- Port to be exposed on the service + port: 50051 + +# resources -- Any resource configuration applied to all pods +resources: {} + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +autoscaling: + # autoscaling.enabled -- Enable HPA + enabled: false + + # autoscaling.minReplicas -- Min amount of replicas for HPA + minReplicas: 1 + + # autoscaling.maxReplicas -- Max amount of replicas for HPA + maxReplicas: 100 + + # autoscaling.targetCPUUtilizationPercentage -- Target CPU usage for HPA + targetCPUUtilizationPercentage: 80 + + # autoscaling.targetMemoryUtilizationPercentage -- Target memory usage for HPA + targetMemoryUtilizationPercentage: 80 + +# nodeSelector -- Specify the nodeSelector for all pods +nodeSelector: {} + +# tolerations -- Specify the tolerations for all pods +tolerations: [] + +# affinity -- Specify the affinity for all pods +affinity: {} + +env: + # env.nodeEnv -- The selected node environment and config + nodeEnv: production + + # env.extras -- Any extra environment variables appended to all pods + extras: [] + +# Override the config of the container +config: + # config.name -- Name of the config map to be mounted. + # If specified, config will be appended to the node environment automatically + name: "" + + # config.file -- Name of the file in the config map + file: "config_production_override.json" + + # config.literal -- Provide the literal config through this string. + # Has to be in a JSON format + literal: "" diff --git a/charts/pdf-rendering-srv/Chart.yaml b/charts/pdf-rendering-srv/Chart.yaml index 01301b3..a0bbdb3 100644 --- a/charts/pdf-rendering-srv/Chart.yaml +++ b/charts/pdf-rendering-srv/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: pdf-rendering-srv description: A Helm chart for restorecommerce pdf-rendering-srv type: application -version: 0.1.1 +version: 0.1.2 appVersion: 0.1.0 icon: https://avatars0.githubusercontent.com/u/8339525 home: https://docs.restorecommerce.io/pdf-rendering-srv/index.html diff --git a/charts/pdf-rendering-srv/README.md b/charts/pdf-rendering-srv/README.md index e20174b..40455e2 100644 --- a/charts/pdf-rendering-srv/README.md +++ b/charts/pdf-rendering-srv/README.md @@ -1,6 +1,6 @@ # pdf-rendering-srv -![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-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) +![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-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) A Helm chart for restorecommerce pdf-rendering-srv @@ -29,7 +29,7 @@ A Helm chart for restorecommerce pdf-rendering-srv | env.extras | list | `[]` | Any extra environment variables appended to all pods | | env.nodeEnv | string | `"production"` | The selected node environment and config | | fullnameOverride | string | `""` | Full name override for all resources | -| image.pullPolicy | string | `"IfNotPresent"` | Pull policy of the deployment | +| image.pullPolicy | string | `"Always"` | Pull policy of the deployment | | image.repository | string | `"restorecommerce/pdf-rendering-srv"` | Image to be used for deployment | | image.tag | string | `"0.1.0"` | Image tag | | imagePullSecrets | list | `[]` | List of secrets for images | diff --git a/charts/pdf-rendering-srv/values.yaml b/charts/pdf-rendering-srv/values.yaml index 214510a..0691bf9 100644 --- a/charts/pdf-rendering-srv/values.yaml +++ b/charts/pdf-rendering-srv/values.yaml @@ -8,7 +8,7 @@ image: repository: restorecommerce/pdf-rendering-srv # image.pullPolicy -- Pull policy of the deployment - pullPolicy: IfNotPresent + pullPolicy: Always # image.tag -- Image tag tag: 0.1.0 diff --git a/charts/rendering-srv/Chart.yaml b/charts/rendering-srv/Chart.yaml index 52df15e..7c7737f 100644 --- a/charts/rendering-srv/Chart.yaml +++ b/charts/rendering-srv/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: rendering-srv description: A Helm chart for restorecommerce rendering-srv type: application -version: 0.1.1 -appVersion: 0.1.2 +version: 0.1.2 +appVersion: 0.1.5 icon: https://avatars0.githubusercontent.com/u/8339525 home: https://docs.restorecommerce.io/rendering-srv/index.html sources: diff --git a/charts/rendering-srv/README.md b/charts/rendering-srv/README.md index f30be10..2ada78c 100644 --- a/charts/rendering-srv/README.md +++ b/charts/rendering-srv/README.md @@ -1,6 +1,6 @@ # rendering-srv -![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.2](https://img.shields.io/badge/AppVersion-0.1.2-informational?style=flat-square) +![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.5](https://img.shields.io/badge/AppVersion-0.1.5-informational?style=flat-square) A Helm chart for restorecommerce rendering-srv @@ -33,9 +33,9 @@ A Helm chart for restorecommerce rendering-srv | env.nodeEnv | string | `"production"` | The selected node environment and config | | fullnameOverride | string | `""` | Full name override for all resources | | handlebars | object | `{"helper-list.js":"module.exports = function listHandlebarsExtensions(hbs, opts) {\n hbs.registerHelper(\"list\", function(items, options) {\n const itemsAsHtml = items.map(item => \"
  • \" + options.fn(item) + \"
  • \");\n return \"
      \\n\" + itemsAsHtml.join(\"\\n\") + \"\\n
    \";\n });\n};\n"}` | Handlebar helpers to be injected in the container More information: https://github.com/restorecommerce/handlebars-helperized | -| image.pullPolicy | string | `"IfNotPresent"` | Pull policy of the deployment | +| image.pullPolicy | string | `"Always"` | Pull policy of the deployment | | image.repository | string | `"restorecommerce/rendering-srv"` | Image to be used for deployment | -| image.tag | string | `"0.1.2"` | Image tag | +| image.tag | string | `"0.1.5"` | Image tag | | imagePullSecrets | list | `[]` | List of secrets for images | | nameOverride | string | `""` | Name override for all resources | | nodeSelector | object | `{}` | Specify the nodeSelector for all pods | diff --git a/charts/rendering-srv/templates/deployment.yaml b/charts/rendering-srv/templates/deployment.yaml index 3d07cec..b01ddc2 100644 --- a/charts/rendering-srv/templates/deployment.yaml +++ b/charts/rendering-srv/templates/deployment.yaml @@ -50,17 +50,16 @@ spec: periodSeconds: 30 exec: command: - - sh - - -c - - NODE_OPTIONS=--no-deprecation npm run --silent healthcheck + - /bin/grpc_health_probe + - -addr=:50051 readinessProbe: initialDelaySeconds: 10 - periodSeconds: 30 + periodSeconds: 15 exec: command: - - sh - - -c - - NODE_OPTIONS=--no-deprecation npm run --silent healthcheck + - /bin/grpc_health_probe + - -addr=:50051 + - -service=readiness resources: {{- toYaml .Values.resources | nindent 12 }} volumeMounts: diff --git a/charts/rendering-srv/values.yaml b/charts/rendering-srv/values.yaml index 2327aec..ee1c33e 100644 --- a/charts/rendering-srv/values.yaml +++ b/charts/rendering-srv/values.yaml @@ -8,10 +8,10 @@ image: repository: restorecommerce/rendering-srv # image.pullPolicy -- Pull policy of the deployment - pullPolicy: IfNotPresent + pullPolicy: Always # image.tag -- Image tag - tag: 0.1.2 + tag: 0.1.5 # imagePullSecrets -- List of secrets for images imagePullSecrets: [] diff --git a/charts/scheduling-srv/Chart.yaml b/charts/scheduling-srv/Chart.yaml index 73f02c8..4090c8e 100644 --- a/charts/scheduling-srv/Chart.yaml +++ b/charts/scheduling-srv/Chart.yaml @@ -2,8 +2,8 @@ apiVersion: v2 name: scheduling-srv description: A Helm chart for restorecommerce scheduling-srv type: application -version: 0.1.1 -appVersion: 0.1.4 +version: 0.1.2 +appVersion: 0.1.7 icon: https://avatars0.githubusercontent.com/u/8339525 home: https://docs.restorecommerce.io/scheduling-srv/index.html sources: diff --git a/charts/scheduling-srv/README.md b/charts/scheduling-srv/README.md index dae6e5b..77f6941 100644 --- a/charts/scheduling-srv/README.md +++ b/charts/scheduling-srv/README.md @@ -1,6 +1,6 @@ # scheduling-srv -![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.4](https://img.shields.io/badge/AppVersion-0.1.4-informational?style=flat-square) +![Version: 0.1.2](https://img.shields.io/badge/Version-0.1.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.7](https://img.shields.io/badge/AppVersion-0.1.7-informational?style=flat-square) A Helm chart for restorecommerce scheduling-srv @@ -32,9 +32,9 @@ A Helm chart for restorecommerce scheduling-srv | env.extras | list | `[]` | Any extra environment variables appended to all pods | | env.nodeEnv | string | `"production"` | The selected node environment and config | | fullnameOverride | string | `""` | Full name override for all resources | -| image.pullPolicy | string | `"IfNotPresent"` | Pull policy of the deployment | +| image.pullPolicy | string | `"Always"` | Pull policy of the deployment | | image.repository | string | `"restorecommerce/scheduling-srv"` | Image to be used for deployment | -| image.tag | string | `"0.1.4"` | Image tag | +| image.tag | string | `"0.1.7"` | Image tag | | imagePullSecrets | list | `[]` | List of secrets for images | | nameOverride | string | `""` | Name override for all resources | | nodeSelector | object | `{}` | Specify the nodeSelector for all pods | diff --git a/charts/scheduling-srv/templates/deployment.yaml b/charts/scheduling-srv/templates/deployment.yaml index adc8fe5..d2d71cf 100644 --- a/charts/scheduling-srv/templates/deployment.yaml +++ b/charts/scheduling-srv/templates/deployment.yaml @@ -49,17 +49,16 @@ spec: periodSeconds: 30 exec: command: - - sh - - -c - - NODE_OPTIONS=--no-deprecation npm run --silent healthcheck + - /bin/grpc_health_probe + - -addr=:50051 readinessProbe: initialDelaySeconds: 10 - periodSeconds: 30 + periodSeconds: 15 exec: command: - - sh - - -c - - NODE_OPTIONS=--no-deprecation npm run --silent healthcheck + - /bin/grpc_health_probe + - -addr=:50051 + - -service=readiness resources: {{- toYaml .Values.resources | nindent 12 }} {{- if or .Values.config.name .Values.config.literal }} diff --git a/charts/scheduling-srv/values.yaml b/charts/scheduling-srv/values.yaml index 896689e..cdc9357 100644 --- a/charts/scheduling-srv/values.yaml +++ b/charts/scheduling-srv/values.yaml @@ -8,10 +8,10 @@ image: repository: restorecommerce/scheduling-srv # image.pullPolicy -- Pull policy of the deployment - pullPolicy: IfNotPresent + pullPolicy: Always # image.tag -- Image tag - tag: 0.1.4 + tag: 0.1.7 # imagePullSecrets -- List of secrets for images imagePullSecrets: [] diff --git a/charts/store-front/Chart.yaml b/charts/store-front/Chart.yaml index 36509c4..7b55489 100644 --- a/charts/store-front/Chart.yaml +++ b/charts/store-front/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: store-front description: A Helm chart for restorecommerce store-front type: application -version: 0.1.0 +version: 0.1.1 appVersion: 0.1.0 icon: https://avatars0.githubusercontent.com/u/8339525 sources: diff --git a/charts/store-front/README.md b/charts/store-front/README.md index 1d824fa..b4fd3f0 100644 --- a/charts/store-front/README.md +++ b/charts/store-front/README.md @@ -1,6 +1,6 @@ # store-front -![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) +![Version: 0.1.1](https://img.shields.io/badge/Version-0.1.1-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) A Helm chart for restorecommerce store-front @@ -27,7 +27,7 @@ A Helm chart for restorecommerce store-front | env.extras | list | `[]` | Any extra environment variables appended to all pods | | env.nodeEnv | string | `"production"` | The selected node environment and config | | fullnameOverride | string | `""` | Full name override for all resources | -| image.pullPolicy | string | `"IfNotPresent"` | Pull policy of the deployment | +| image.pullPolicy | string | `"Always"` | Pull policy of the deployment | | image.repository | string | `"restorecommerce/store-front"` | Image to be used for deployment | | image.tag | string | `"0.1.0"` | Image tag | | imagePullSecrets | list | `[]` | List of secrets for images | diff --git a/charts/store-front/values.yaml b/charts/store-front/values.yaml index 58c5bfa..e88728f 100644 --- a/charts/store-front/values.yaml +++ b/charts/store-front/values.yaml @@ -8,7 +8,7 @@ image: repository: restorecommerce/store-front # image.pullPolicy -- Pull policy of the deployment - pullPolicy: IfNotPresent + pullPolicy: Always # image.tag -- Image tag tag: 0.1.0 diff --git a/example/helmfile/arangodb-crd-helmfile.yaml b/example/helmfile/arangodb-crd-helmfile.yaml index 5388c36..2e37970 100644 --- a/example/helmfile/arangodb-crd-helmfile.yaml +++ b/example/helmfile/arangodb-crd-helmfile.yaml @@ -1,7 +1,7 @@ releases: - name: arangodb-crd namespace: restorecommerce - chart: https://github.com/arangodb/kube-arangodb/releases/download/1.0.7/kube-arangodb-crd-1.0.7.tgz + chart: https://github.com/arangodb/kube-arangodb/releases/download/1.1.0/kube-arangodb-crd-1.1.0.tgz installed: true atomic: true cleanupOnFail: true \ No newline at end of file diff --git a/example/helmfile/helmfile.yaml b/example/helmfile/helmfile.yaml index 8d270a3..5acc11f 100644 --- a/example/helmfile/helmfile.yaml +++ b/example/helmfile/helmfile.yaml @@ -28,7 +28,7 @@ helmfiles: releases: - name: identity-srv namespace: restorecommerce - chart: restorecommerce/identity-srv + chart: ../../charts/identity-srv installed: true atomic: false wait: false @@ -42,36 +42,10 @@ releases: value: redis-master - name: logger__elasticsearch__clientOpts__node value: http://elasticsearch-master:9200 - config: - literal: | - { - "server": { - "transports": [ - { - "name": "grpcIdentity", - "provider": "grpc", - "services": { - "io-restorecommerce-user-srv": "io.restorecommerce.user.Service", - "io-restorecommerce-role-srv": "io.restorecommerce.role.Service", - "io-restorecommerce-identity-reflection": "grpc.reflection.v1alpha.ServerReflection", - "io-restorecommerce-identity-cis": "io.restorecommerce.commandinterface.Service" - }, - "protos": [ - "io/restorecommerce/user.proto", - "io/restorecommerce/role.proto", - "grpc/reflection/v1alpha/reflection.proto", - "io/restorecommerce/commandinterface.proto" - ], - "protoRoot": "node_modules/@restorecommerce/protos/", - "addr": "0.0.0.0:50051" - } - ] - } - } - name: notification-srv namespace: restorecommerce - chart: restorecommerce/notification-srv + chart: ../../charts/notification-srv installed: true atomic: false wait: false @@ -83,34 +57,10 @@ releases: value: redis-master - name: logger__elasticsearch__clientOpts__node value: http://elasticsearch-master:9200 - config: - literal: | - { - "server": { - "transports": [ - { - "name": "notificationGRPC", - "provider": "grpc", - "services": { - "io-restorecommerce-notification-srv": "io.restorecommerce.notification.Service", - "io-restorecommerce-notification-cis": "io.restorecommerce.commandinterface.Service", - "io-restorecommerce-notification-reflection": "grpc.reflection.v1alpha.ServerReflection" - }, - "protos": [ - "io/restorecommerce/notification.proto", - "io/restorecommerce/commandinterface.proto", - "grpc/reflection/v1alpha/reflection.proto" - ], - "protoRoot": "node_modules/@restorecommerce/protos/", - "addr": "0.0.0.0:50051" - } - ] - } - } - name: access-control-srv namespace: restorecommerce - chart: restorecommerce/access-control-srv + chart: ../../charts/access-control-srv installed: true atomic: false wait: false @@ -127,7 +77,7 @@ releases: - name: ostorage-srv namespace: restorecommerce - chart: restorecommerce/ostorage-srv + chart: ../../charts/ostorage-srv installed: true atomic: false wait: false @@ -145,44 +95,10 @@ releases: value: {{ .Values.minio.accessKey }} - name: s3__client__secretAccessKey value: {{ .Values.minio.secretKey }} - config: - literal: | - { - "server": { - "transports": [ - { - "name": "grpcOstorage", - "provider": "grpc", - "services": { - "io-restorecommerce-ostorage-srv": "io.restorecommerce.ostorage.Service", - "io-restorecommerce-ostorage-reflection": "grpc.reflection.v1alpha.ServerReflection", - "io-restorecommerce-ostorage-cis": "io.restorecommerce.commandinterface.Service" - }, - "protos": [ - "io/restorecommerce/ostorage.proto", - "grpc/reflection/v1alpha/reflection.proto", - "io/restorecommerce/commandinterface.proto" - ], - "protoRoot": "node_modules/@restorecommerce/protos/", - "addr": "0.0.0.0:50051" - } - ] - }, - "client": { - "acs-srv": { - "publisher": { - "name": "static", - "instances": [ - "grpc://access-control-srv:50051" - ] - } - } - } - } - name: scheduling-srv namespace: restorecommerce - chart: restorecommerce/scheduling-srv + chart: ../../charts/scheduling-srv installed: true atomic: false wait: false @@ -196,45 +112,10 @@ releases: value: redis-master - name: logger__elasticsearch__clientOpts__node value: http://elasticsearch-master:9200 - config: - literal: | - { - "server": { - "transports": [ - { - "name": "schedulingGRPC", - "provider": "grpc", - "services": { - "io-restorecommerce-scheduling-srv": "io.restorecommerce.job.Service", - "io-restorecommerce-scheduling-cis": "io.restorecommerce.commandinterface.Service", - "io-restorecommerce-scheduling-reflection": "grpc.reflection.v1alpha.ServerReflection" - }, - "protos": [ - "io/restorecommerce/job.proto", - "io/restorecommerce/commandinterface.proto", - "grpc/reflection/v1alpha/reflection.proto", - "google/protobuf/descriptor.proto" - ], - "protoRoot": "node_modules/@restorecommerce/protos/", - "addr": "0.0.0.0:50051" - } - ] - }, - "client": { - "acs-srv": { - "publisher": { - "name": "static", - "instances": [ - "grpc://access-control-srv:50051" - ] - } - } - } - } - name: rendering-srv namespace: restorecommerce - chart: restorecommerce/rendering-srv + chart: ../../charts/rendering-srv installed: true atomic: false wait: false @@ -246,37 +127,107 @@ releases: value: redis-master - name: logger__elasticsearch__clientOpts__node value: http://elasticsearch-master:9200 - config: - literal: | - { - "server": { - "transports": [ - { - "name": "grpcRendering", - "provider": "grpc", - "services": { - "io-restorecommerce-rendering-cis": "io.restorecommerce.commandinterface.Service", - "io-restorecommerce-rendering-reflection": "grpc.reflection.v1alpha.ServerReflection" - }, - "protos": [ - "io/restorecommerce/commandinterface.proto", - "grpc/reflection/v1alpha/reflection.proto" - ], - "protoRoot": "node_modules/@restorecommerce/protos/", - "addr": "0.0.0.0:50051" - } - ] - } - } - name: pdf-rendering-srv namespace: restorecommerce - chart: restorecommerce/pdf-rendering-srv + chart: ../../charts/pdf-rendering-srv installed: true atomic: false wait: false cleanupOnFail: true + - name: fulfillment-srv + namespace: restorecommerce + chart: ../../charts/fulfillment-srv + installed: true + atomic: false + wait: false + cleanupOnFail: true + values: + - env: + extras: + - name: redis__host + value: redis-master + - name: logger__elasticsearch__clientOpts__node + value: http://elasticsearch-master:9200 + + - name: indexing-srv + namespace: restorecommerce + chart: ../../charts/indexing-srv + installed: true + atomic: false + wait: false + cleanupOnFail: true + values: + - env: + extras: + - name: redis__host + value: redis-master + - name: logger__elasticsearch__clientOpts__node + value: http://elasticsearch-master:9200 + - name: elasticsearch__client__node + value: http://elasticsearch-master:9200 + + - name: catalog-srv + namespace: restorecommerce + chart: ../../charts/catalog-srv + installed: true + atomic: false + wait: false + cleanupOnFail: true + values: + - env: + extras: + - name: redis__host + value: redis-master + - name: logger__elasticsearch__clientOpts__node + value: http://elasticsearch-master:9200 + + - name: invoicing-srv + namespace: restorecommerce + chart: ../../charts/invoicing-srv + installed: true + atomic: false + wait: false + cleanupOnFail: true + values: + - env: + extras: + - name: redis__host + value: redis-master + - name: logger__elasticsearch__clientOpts__node + value: http://elasticsearch-master:9200 + + - name: ordering-srv + namespace: restorecommerce + chart: ../../charts/ordering-srv + installed: true + atomic: false + wait: false + cleanupOnFail: true + values: + - env: + extras: + - name: redis__host + value: redis-master + - name: logger__elasticsearch__clientOpts__node + value: http://elasticsearch-master:9200 + + - name: payment-srv + namespace: restorecommerce + chart: ../../charts/payment-srv + installed: true + atomic: false + wait: false + cleanupOnFail: true + values: + - env: + extras: + - name: redis__host + value: redis-master + - name: logger__elasticsearch__clientOpts__node + value: http://elasticsearch-master:9200 + - name: minio namespace: restorecommerce chart: minio/minio @@ -368,7 +319,7 @@ releases: - name: arangodb namespace: restorecommerce - chart: https://github.com/arangodb/kube-arangodb/releases/download/1.0.7/kube-arangodb-1.0.7.tgz + chart: https://github.com/arangodb/kube-arangodb/releases/download/1.1.0/kube-arangodb-1.1.0.tgz installed: true atomic: true cleanupOnFail: true