Skip to content

Commit

Permalink
Merge pull request #8 from restorecommerce/renovate/upgrade-add-facad…
Browse files Browse the repository at this point in the history
…e-resource

Upgrade, add facade-srv, resource-srv
  • Loading branch information
Vilsol authored Mar 25, 2021
2 parents 75178c3 + 33381c8 commit 653277c
Show file tree
Hide file tree
Showing 61 changed files with 977 additions and 115 deletions.
2 changes: 1 addition & 1 deletion .github/add-repos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ helm repo add restorecommerce https://restorecommerce.github.io/helm/
helm repo add minio https://helm.min.io
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo add elastic https://helm.elastic.co
helm repo add stable https://kubernetes-charts.storage.googleapis.com
helm repo add stable https://charts.helm.sh/stable
2 changes: 1 addition & 1 deletion .github/ct.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ chart-repos:
- minio=https://helm.min.io
- bitnami=https://charts.bitnami.com/bitnami
- elastic=https://helm.elastic.co
- stable=https://kubernetes-charts.storage.googleapis.com
- stable=https://charts.helm.sh/stable
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ This repository contains helm charts for the following services:
* [access-control-srv](./charts/access-control-srv)
* [catalog-srv](./charts/catalog-srv)
* [console](./charts/console)
* [facade-srv](./charts/facade-srv)
* [fulfillment-srv](./charts/fulfillment-srv)
* [identity-srv](./charts/identity-srv)
* [indexing-srv](./charts/indexing-srv)
Expand All @@ -15,6 +16,7 @@ This repository contains helm charts for the following services:
* [payment-srv](./charts/payment-srv)
* [pdf-rendering-srv](./charts/pdf-rendering-srv)
* [rendering-srv](./charts/rendering-srv)
* [resource-srv](./charts/resource-srv)
* [scheduling-srv](./charts/scheduling-srv)
* [store-front](./charts/store-front)
* [system](./charts/system)
Expand Down
4 changes: 2 additions & 2 deletions charts/access-control-srv/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: access-control-srv
description: A Helm chart for restorecommerce access-control-srv
type: application
version: 0.1.2
appVersion: 0.1.6
version: 0.1.3
appVersion: 0.1.17
icon: https://avatars0.githubusercontent.com/u/8339525
home: https://docs.restorecommerce.io/access-control-srv/index.html
sources:
Expand Down
6 changes: 3 additions & 3 deletions charts/access-control-srv/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# access-control-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.6](https://img.shields.io/badge/AppVersion-0.1.6-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.17](https://img.shields.io/badge/AppVersion-0.1.17-informational?style=flat-square)

A Helm chart for restorecommerce access-control-srv

Expand Down Expand Up @@ -33,8 +33,8 @@ A Helm chart for restorecommerce access-control-srv
| 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/access-control-srv"` | Image to be used for deployment |
| image.tag | string | `"0.1.6"` | Image tag |
| image.repository | string | `"ghcr.io/restorecommerce/access-control-srv"` | Image to be used for deployment |
| image.tag | string | `""` | Image tag |
| imagePullSecrets | list | `[]` | List of secrets for images |
| nameOverride | string | `""` | Name override for all resources |
| nodeSelector | object | `{}` | Specify the nodeSelector for all pods |
Expand Down
4 changes: 2 additions & 2 deletions charts/access-control-srv/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ replicaCount: 1

image:
# image.repository -- Image to be used for deployment
repository: restorecommerce/access-control-srv
repository: ghcr.io/restorecommerce/access-control-srv

# image.pullPolicy -- Pull policy of the deployment
pullPolicy: Always

# image.tag -- Image tag
tag: 0.1.6
tag: ""

# imagePullSecrets -- List of secrets for images
imagePullSecrets: []
Expand Down
4 changes: 2 additions & 2 deletions charts/catalog-srv/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: catalog-srv
description: A Helm chart for restorecommerce catalog-srv
type: application
version: 0.1.0
appVersion: 0.0.3
version: 0.1.1
appVersion: 0.0.4
icon: https://avatars0.githubusercontent.com/u/8339525
home: https://docs.restorecommerce.io/catalog-srv/index.html
sources:
Expand Down
6 changes: 3 additions & 3 deletions charts/catalog-srv/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 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)
![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.0.4](https://img.shields.io/badge/AppVersion-0.0.4-informational?style=flat-square)

A Helm chart for restorecommerce catalog-srv

Expand Down Expand Up @@ -33,8 +33,8 @@ A Helm chart for restorecommerce catalog-srv
| 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 |
| image.repository | string | `"ghcr.io/restorecommerce/catalog-srv"` | Image to be used for deployment |
| image.tag | string | `""` | Image tag |
| imagePullSecrets | list | `[]` | List of secrets for images |
| nameOverride | string | `""` | Name override for all resources |
| nodeSelector | object | `{}` | Specify the nodeSelector for all pods |
Expand Down
4 changes: 2 additions & 2 deletions charts/catalog-srv/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ replicaCount: 1

image:
# image.repository -- Image to be used for deployment
repository: restorecommerce/catalog-srv
repository: ghcr.io/restorecommerce/catalog-srv

# image.pullPolicy -- Pull policy of the deployment
pullPolicy: Always

# image.tag -- Image tag
tag: 0.0.3
tag: ""

# imagePullSecrets -- List of secrets for images
imagePullSecrets: []
Expand Down
23 changes: 23 additions & 0 deletions charts/facade-srv/.helmignore
Original file line number Diff line number Diff line change
@@ -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/
14 changes: 14 additions & 0 deletions charts/facade-srv/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v2
name: facade-srv
description: A Helm chart for restorecommerce facade-srv
type: application
version: 0.1.0
appVersion: 0.1.3
icon: https://avatars0.githubusercontent.com/u/8339525
home: https://docs.restorecommerce.io/facade-srv/index.html
sources:
- https://github.com/restorecommerce/facade-srv
maintainers:
- name: restorecommerce
url: https://restorecommerce.io/
email: [email protected]
51 changes: 51 additions & 0 deletions charts/facade-srv/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# facade-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.1.3](https://img.shields.io/badge/AppVersion-0.1.3-informational?style=flat-square)

A Helm chart for restorecommerce facade-srv

**Homepage:** <https://docs.restorecommerce.io/facade-srv/index.html>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| restorecommerce | [email protected] | https://restorecommerce.io/ |

## Source Code

* <https://github.com/restorecommerce/facade-srv>

## 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 | `"ghcr.io/restorecommerce/facade-srv"` | Image to be used for deployment |
| image.tag | string | `""` | 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 | `5000` | 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 |
76 changes: 76 additions & 0 deletions charts/facade-srv/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "facade-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 "facade-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 "facade-srv.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "facade-srv.labels" -}}
helm.sh/chart: {{ include "facade-srv.chart" . }}
{{ include "facade-srv.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "facade-srv.selectorLabels" -}}
app.kubernetes.io/name: {{ include "facade-srv.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "facade-srv.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "facade-srv.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}

{{/*
Create the NODE_ENV variable.
*/}}
{{- define "facade-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 }}
10 changes: 10 additions & 0 deletions charts/facade-srv/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{{- if .Values.config.literal }}
apiVersion: v1
kind: ConfigMap
metadata:
name: "{{ include "facade-srv.fullname" . }}-config"
labels:
{{- include "facade-srv.labels" . | nindent 4 }}
data:
config_production_override.json: {{ .Values.config.literal | quote }}
{{- end }}
77 changes: 77 additions & 0 deletions charts/facade-srv/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "facade-srv.fullname" . }}
labels:
{{- include "facade-srv.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "facade-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 "facade-srv.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "facade-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 "facade-srv.nodeEnv" . }}
{{- if .Values.env.extras }}
{{- toYaml .Values.env.extras | nindent 12 }}
{{- end }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumeMounts:
{{- if or .Values.config.name .Values.config.literal }}
- name: config
mountPath: "/home/node/facade-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 }}
volumes:
{{- if or .Values.config.name .Values.config.literal }}
- name: config
configMap:
{{- with .Values.config.name }}
name: {{ . | quote }}
{{- end }}
{{- if .Values.config.literal }}
name: "{{ include "facade-srv.fullname" . }}-config"
{{- end }}
{{- end }}
Loading

0 comments on commit 653277c

Please sign in to comment.