mirror of
https://gitlab.fabcity.hamburg/software/fab-city-os-core-chart.git
synced 2024-09-19 20:08:53 +02:00
updated container source and integrated inbox service
This commit is contained in:
parent
2c9d1ad8b6
commit
8c0438c123
5
Makefile
5
Makefile
|
@ -103,6 +103,11 @@ uninstall: ## Run helm uninstall.
|
|||
|
||||
reinstall: uninstall install ## Run helm reinstall.
|
||||
|
||||
deploy: reinstall ## deploy helm chart.
|
||||
|
||||
render: ## Render helm chart.
|
||||
@helm template .
|
||||
|
||||
package: ## Package the helm chart.
|
||||
@helm package . --destination dist
|
||||
|
||||
|
|
|
@ -80,3 +80,4 @@ helm uninstall fcoscore
|
|||
Any new contribution is more than welcome in this project!
|
||||
|
||||
If you want to know more about the development workflow or want to contribute, please visit our [contributing guidelines](/CONTRIBUTING.md) for detailed instructions!
|
||||
|
||||
|
|
|
@ -159,6 +159,37 @@ If release name contains chart name it will be used as a full name.
|
|||
{{- end -}}
|
||||
{{- 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 "fcoscore.inbox.fullname" -}}
|
||||
{{- printf "%s-inbox" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "fcoscore.inbox.port" -}}
|
||||
{{- .Values.inbox.service.port | quote -}}
|
||||
{{- 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 "fcoscore.tarantool.fullname" -}}
|
||||
{{- printf "%s-tarantool" (include "common.names.fullname" .) | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{- define "fcoscore.tarantool.port" -}}
|
||||
{{- .Values.tarantool.service.port -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- define "fcoscore.tarantool.host" -}}
|
||||
{{- printf "%s:%s" (include "fcoscore.tarantool.fullname" . ) ( include "fcoscore.tarantool.port" . ) -}}
|
||||
{{- end -}}
|
||||
|
||||
{{/*
|
||||
Return the Fab City Core secret name
|
||||
*/}}
|
||||
|
|
|
@ -32,7 +32,7 @@ spec:
|
|||
- name: {{ include "fcoscore.frontend.fullname" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.frontend.repository }}:{{ .Values.frontend.tag | default .Chart.AppVersion }}"
|
||||
image: "{{ .Values.frontend.registry }}/{{ .Values.frontend.repository }}:{{ .Values.frontend.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.frontend.pullPolicy }}
|
||||
{{- if .Values.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
|
||||
|
|
|
@ -32,7 +32,7 @@ spec:
|
|||
- name: {{ include "fcoscore.gateway.fullname" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.gateway.repository }}:{{ .Values.gateway.tag | default .Chart.AppVersion }}"
|
||||
image: "{{ .Values.gateway.registry }}/{{ .Values.gateway.repository }}:{{ .Values.gateway.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.gateway.pullPolicy }}
|
||||
{{- if .Values.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
|
||||
|
|
67
templates/inbox/deployment.yaml
Normal file
67
templates/inbox/deployment.yaml
Normal file
|
@ -0,0 +1,67 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "fcoscore.inbox.fullname" . }}
|
||||
labels:
|
||||
{{- include "fcoscore.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ include "fcoscore.inbox.fullname" . }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app: {{ include "fcoscore.inbox.fullname" . }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "fcoscore.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ include "fcoscore.inbox.fullname" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.inbox.registry }}/{{ .Values.inbox.repository }}:{{ .Values.inbox.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.inbox.pullPolicy }}
|
||||
{{- if .Values.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
|
||||
{{- else if .Values.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
|
||||
{{- else if .Values.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: PORT
|
||||
value: {{ template "fcoscore.inbox.port" . }}
|
||||
- name: TT_HOST
|
||||
value: {{ template "fcoscore.tarantool.host" . }}
|
||||
- name: TT_USER
|
||||
value: inbox
|
||||
- name: TT_PASS
|
||||
value: inbox
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.inbox.service.port }}
|
||||
protocol: TCP
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
29
templates/inbox/hpa.yaml
Normal file
29
templates/inbox/hpa.yaml
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
{{- if .Values.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2beta1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "fcoscore.inbox.fullname" . }}
|
||||
labels:
|
||||
{{- include "fcoscore.labels" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "fcoscore.inbox.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 }}
|
15
templates/inbox/service.yaml
Normal file
15
templates/inbox/service.yaml
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "fcoscore.inbox.fullname" . }}
|
||||
labels: {{- include "fcoscore.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.inbox.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.inbox.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: {{ include "fcoscore.inbox.fullname" . }}
|
58
templates/tarantool/deployment.yaml
Normal file
58
templates/tarantool/deployment.yaml
Normal file
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "fcoscore.tarantool.fullname" . }}
|
||||
labels:
|
||||
{{- include "fcoscore.labels" . | nindent 4 }}
|
||||
spec:
|
||||
{{- if not .Values.autoscaling.enabled }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ include "fcoscore.tarantool.fullname" . }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app: {{ include "fcoscore.tarantool.fullname" . }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "fcoscore.serviceAccountName" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ include "fcoscore.tarantool.fullname" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.tarantool.registry }}/{{ .Values.tarantool.repository }}:{{ .Values.tarantool.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.tarantool.pullPolicy }}
|
||||
{{- if .Values.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.containerSecurityContext.enabled }}
|
||||
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.command "context" $) | nindent 12 }}
|
||||
{{- else if .Values.command }}
|
||||
command: {{- include "common.tplvalues.render" (dict "value" .Values.command "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.diagnosticMode.enabled }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.diagnosticMode.args "context" $) | nindent 12 }}
|
||||
{{- else if .Values.args }}
|
||||
args: {{- include "common.tplvalues.render" (dict "value" .Values.args "context" $) | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.tarantool.service.port }}
|
||||
protocol: TCP
|
||||
resources:
|
||||
{{- toYaml .Values.resources | nindent 12 }}
|
29
templates/tarantool/hpa.yaml
Normal file
29
templates/tarantool/hpa.yaml
Normal file
|
@ -0,0 +1,29 @@
|
|||
---
|
||||
{{- if .Values.autoscaling.enabled }}
|
||||
apiVersion: autoscaling/v2beta1
|
||||
kind: HorizontalPodAutoscaler
|
||||
metadata:
|
||||
name: {{ include "fcoscore.tarantool.fullname" . }}
|
||||
labels:
|
||||
{{- include "fcoscore.labels" . | nindent 4 }}
|
||||
spec:
|
||||
scaleTargetRef:
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
name: {{ include "fcoscore.tarantool.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 }}
|
17
templates/tarantool/service.yaml
Normal file
17
templates/tarantool/service.yaml
Normal file
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "fcoscore.tarantool.fullname" . }}
|
||||
labels: {{- include "fcoscore.labels" . | nindent 4 }}
|
||||
spec:
|
||||
type: {{ .Values.tarantool.service.type }}
|
||||
ports:
|
||||
- port: {{ .Values.tarantool.service.port }}
|
||||
targetPort: http
|
||||
protocol: TCP
|
||||
name: http
|
||||
selector:
|
||||
app: {{ include "fcoscore.tarantool.fullname" . }}
|
||||
|
||||
|
|
@ -32,7 +32,7 @@ spec:
|
|||
- name: {{ include "fcoscore.zenflow.fullname" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.zenflow.repository }}:{{ .Values.zenflow.tag | default .Chart.AppVersion }}"
|
||||
image: "{{ .Values.zenflow.registry }}/{{ .Values.zenflow.repository }}:{{ .Values.zenflow.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.zenflow.pullPolicy }}
|
||||
{{- if .Values.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
|
||||
|
|
|
@ -32,7 +32,7 @@ spec:
|
|||
- name: {{ include "fcoscore.zvmlet.fullname" . }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||
image: "{{ .Values.zvmlet.repository }}:{{ .Values.zvmlet.tag | default .Chart.AppVersion }}"
|
||||
image: "{{ .Values.zvmlet.registry }}/{{ .Values.zvmlet.repository }}:{{ .Values.zvmlet.tag | default .Chart.AppVersion }}"
|
||||
imagePullPolicy: {{ .Values.zvmlet.pullPolicy }}
|
||||
{{- if .Values.lifecycleHooks }}
|
||||
lifecycle: {{- include "common.tplvalues.render" (dict "value" .Values.lifecycleHooks "context" $) | nindent 12 }}
|
||||
|
|
76
values.yaml
76
values.yaml
|
@ -176,8 +176,8 @@ affinity: {}
|
|||
## @param image.debug Enable image debug mode
|
||||
##
|
||||
zenflow:
|
||||
registry: docker.io
|
||||
repository: fabcityhamburg/zenflows
|
||||
registry: ghcr.io
|
||||
repository: interfacerproject/zenflows
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
|
@ -195,7 +195,7 @@ zenflow:
|
|||
##
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
# tag: ""
|
||||
tag: ""
|
||||
tag: master
|
||||
secretName: ""
|
||||
existingSecret: ""
|
||||
debug: false
|
||||
|
@ -206,8 +206,8 @@ zenflow:
|
|||
salt: ""
|
||||
|
||||
zvmlet:
|
||||
registry: docker.io
|
||||
repository: fabcityhamburg/zvmlet
|
||||
registry: ghcr.io
|
||||
repository: interfacerproject/zenflows-crypto
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
|
@ -224,15 +224,15 @@ zvmlet:
|
|||
## Set to true if you would like to see extra information on logs
|
||||
##
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
tag: latest
|
||||
debug: false
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 3000
|
||||
|
||||
frontend:
|
||||
registry: docker.io
|
||||
repository: fabcityhamburg/interfacer-gui
|
||||
registry: ghcr.io
|
||||
repository: interfacerproject/interfacer-gui
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
|
@ -249,15 +249,15 @@ frontend:
|
|||
## Set to true if you would like to see extra information on logs
|
||||
##
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
tag: main
|
||||
debug: false
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 8080
|
||||
|
||||
gateway:
|
||||
registry: docker.io
|
||||
repository: fabcityhamburg/interfacer-gateway
|
||||
registry: ghcr.io
|
||||
repository: interfacerproject/interfacer-gateway
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
|
@ -274,13 +274,65 @@ gateway:
|
|||
## Set to true if you would like to see extra information on logs
|
||||
##
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: ""
|
||||
tag: main
|
||||
debug: false
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 3000
|
||||
url: ""
|
||||
|
||||
inbox:
|
||||
registry: ghcr.io
|
||||
repository: interfacerproject/zenflows-inbox-tarantool
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
## e.g:
|
||||
## pullSecrets:
|
||||
## - myRegistryKeySecretName
|
||||
##
|
||||
pullSecrets: []
|
||||
## Set to true if you would like to see extra information on logs
|
||||
##
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: main
|
||||
debug: false
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 8080
|
||||
url: ""
|
||||
|
||||
tarantool:
|
||||
registry: ghcr.io
|
||||
repository: interfacerproject/zenflows-inbox-tarantool-db
|
||||
## Specify a imagePullPolicy
|
||||
## Defaults to 'Always' if image tag is 'latest', else set to 'IfNotPresent'
|
||||
## ref: https://kubernetes.io/docs/user-guide/images/#pre-pulling-images
|
||||
##
|
||||
pullPolicy: IfNotPresent
|
||||
## Optionally specify an array of imagePullSecrets.
|
||||
## Secrets must be manually created in the namespace.
|
||||
## ref: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
|
||||
## e.g:
|
||||
## pullSecrets:
|
||||
## - myRegistryKeySecretName
|
||||
##
|
||||
pullSecrets: []
|
||||
## Set to true if you would like to see extra information on logs
|
||||
##
|
||||
# Overrides the image tag whose default is the chart appVersion.
|
||||
tag: main
|
||||
debug: false
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 3500
|
||||
url: ""
|
||||
|
||||
## Persistence Parameters
|
||||
## ref: https://kubernetes.io/docs/user-guide/persistent-volumes/
|
||||
##
|
||||
|
|
Loading…
Reference in a new issue