🔧(project) replace webrtc by yProvider

Replace webrtc by yProvider the project
(docker, helm chart, etc).
This commit is contained in:
Anthony LC
2024-09-04 16:56:40 +02:00
committed by Anthony LC
parent 9c512fae69
commit 520d511f59
18 changed files with 138 additions and 137 deletions

View File

@@ -1,10 +1,10 @@
FROM node:20-alpine as frontend-deps-y-webrtc-signaling
FROM node:20-alpine as frontend-deps-y-provider
WORKDIR /home/frontend/
COPY ./src/frontend/package.json ./package.json
COPY ./src/frontend/yarn.lock ./yarn.lock
COPY ./src/frontend/apps/y-webrtc-signaling/package.json ./apps/y-webrtc-signaling/package.json
COPY ./src/frontend/servers/y-provider/package.json ./servers/y-provider/package.json
COPY ./src/frontend/packages/eslint-config-impress/package.json ./packages/eslint-config-impress/package.json
RUN yarn install
@@ -14,10 +14,10 @@ COPY ./src/frontend/ .
# Copy entrypoint
COPY ./docker/files/usr/local/bin/entrypoint /usr/local/bin/entrypoint
# ---- y-webrtc-signaling ----
FROM frontend-deps-y-webrtc-signaling as y-webrtc-signaling
# ---- y-provider ----
FROM frontend-deps-y-provider as y-provider
WORKDIR /home/frontend/apps/y-webrtc-signaling
WORKDIR /home/frontend/servers/y-provider
RUN yarn build
# Un-privileged user running the application
@@ -64,8 +64,8 @@ WORKDIR /home/frontend/apps/impress
ARG FRONTEND_THEME
ENV NEXT_PUBLIC_THEME=${FRONTEND_THEME}
ARG SIGNALING_URL
ENV NEXT_PUBLIC_SIGNALING_URL=${SIGNALING_URL}
ARG Y_PROVIDER_URL
ENV NEXT_PUBLIC_Y_PROVIDER_URL=${Y_PROVIDER_URL}
ARG API_ORIGIN
ENV NEXT_PUBLIC_API_ORIGIN=${API_ORIGIN}

View File

@@ -84,11 +84,11 @@ frontend:
pullPolicy: Always
tag: "latest"
webrtc:
yProvider:
replicas: 1
image:
repository: localhost:5001/impress-y-webrtc-signaling
repository: localhost:5001/impress-y-provider
pullPolicy: Always
tag: "latest"

View File

@@ -126,9 +126,9 @@ frontend:
pullPolicy: Always
tag: "v1.2.1"
webrtc:
yProvider:
image:
repository: lasuite/impress-y-webrtc-signaling
repository: lasuite/impress-y-provider
pullPolicy: Always
tag: "v1.2.1"

View File

@@ -126,9 +126,9 @@ frontend:
pullPolicy: Always
tag: "v1.2.1"
webrtc:
yProvider:
image:
repository: lasuite/impress-y-webrtc-signaling
repository: lasuite/impress-y-provider
pullPolicy: Always
tag: "v1.2.1"

View File

@@ -126,9 +126,9 @@ frontend:
pullPolicy: Always
tag: "main"
webrtc:
yProvider:
image:
repository: lasuite/impress-y-webrtc-signaling
repository: lasuite/impress-y-provider
pullPolicy: Always
tag: "main"

View File

@@ -149,12 +149,12 @@ Requires top level scope
{{- end }}
{{/*
Full name for the webrtc
Full name for the yProvider
Requires top level scope
*/}}
{{- define "impress.webrtc.fullname" -}}
{{ include "impress.fullname" . }}-webrtc
{{- define "impress.yProvider.fullname" -}}
{{ include "impress.fullname" . }}-y-provider
{{- end }}
{{/*

View File

@@ -52,17 +52,17 @@ spec:
{{- end }}
backend:
service:
name: {{ include "impress.webrtc.fullname" . }}
name: {{ include "impress.yProvider.fullname" . }}
port:
number: {{ .Values.webrtc.service.port }}
number: {{ .Values.yProvider.service.port }}
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ include "impress.webrtc.fullname" . }}
name: {{ include "impress.yProvider.fullname" . }}
port:
number: {{ .Values.webrtc.service.port }}
number: {{ .Values.yProvider.service.port }}
{{- else }}
serviceName: {{ include "impress.webrtc.fullname" . }}
servicePort: {{ .Values.webrtc.service.port }}
serviceName: {{ include "impress.yProvider.fullname" . }}
servicePort: {{ .Values.yProvider.service.port }}
{{- end }}
{{- with .Values.ingressWS.customBackends }}
{{- toYaml . | nindent 10 }}

View File

@@ -1,21 +0,0 @@
{{- $envVars := include "impress.common.env" (list . .Values.webrtc) -}}
{{- $fullName := include "impress.webrtc.fullname" . -}}
{{- $component := "webrtc" -}}
apiVersion: v1
kind: Service
metadata:
name: {{ $fullName }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "impress.common.labels" (list . $component) | nindent 4 }}
annotations:
{{- toYaml $.Values.webrtc.service.annotations | nindent 4 }}
spec:
type: {{ .Values.webrtc.service.type }}
ports:
- port: {{ .Values.webrtc.service.port }}
targetPort: {{ .Values.webrtc.service.targetPort }}
protocol: TCP
name: http
selector:
{{- include "impress.common.selectorLabels" (list . $component) | nindent 4 }}

View File

@@ -1,6 +1,6 @@
{{- $envVars := include "impress.common.env" (list . .Values.webrtc) -}}
{{- $fullName := include "impress.webrtc.fullname" . -}}
{{- $component := "webrtc" -}}
{{- $envVars := include "impress.common.env" (list . .Values.yProvider) -}}
{{- $fullName := include "impress.yProvider.fullname" . -}}
{{- $component := "yProvider" -}}
apiVersion: apps/v1
kind: Deployment
metadata:
@@ -9,14 +9,14 @@ metadata:
labels:
{{- include "impress.common.labels" (list . $component) | nindent 4 }}
spec:
replicas: {{ .Values.webrtc.replicas }}
replicas: {{ .Values.yProvider.replicas }}
selector:
matchLabels:
{{- include "impress.common.selectorLabels" (list . $component) | nindent 6 }}
template:
metadata:
annotations:
{{- with .Values.webrtc.podAnnotations }}
{{- with .Values.yProvider.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
@@ -26,19 +26,19 @@ spec:
imagePullSecrets:
- name: {{ include "impress.secret.dockerconfigjson.name" (dict "fullname" (include "impress.fullname" .) "imageCredentials" $.Values.image.credentials) }}
{{- end}}
shareProcessNamespace: {{ .Values.webrtc.shareProcessNamespace }}
shareProcessNamespace: {{ .Values.yProvider.shareProcessNamespace }}
containers:
{{- with .Values.webrtc.sidecars }}
{{- with .Values.yProvider.sidecars }}
{{- toYaml . | nindent 8 }}
{{- end }}
- name: {{ .Chart.Name }}
image: "{{ (.Values.webrtc.image | default dict).repository | default .Values.image.repository }}:{{ (.Values.webrtc.image | default dict).tag | default .Values.image.tag }}"
imagePullPolicy: {{ (.Values.webrtc.image | default dict).pullPolicy | default .Values.image.pullPolicy }}
{{- with .Values.webrtc.command }}
image: "{{ (.Values.yProvider.image | default dict).repository | default .Values.image.repository }}:{{ (.Values.yProvider.image | default dict).tag | default .Values.image.tag }}"
imagePullPolicy: {{ (.Values.yProvider.image | default dict).pullPolicy | default .Values.image.pullPolicy }}
{{- with .Values.yProvider.command }}
command:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- with .Values.webrtc.args }}
{{- with .Values.yProvider.args }}
args:
{{- toYaml . | nindent 12 }}
{{- end }}
@@ -46,27 +46,27 @@ spec:
{{- if $envVars}}
{{- $envVars | indent 12 }}
{{- end }}
{{- with .Values.webrtc.securityContext }}
{{- with .Values.yProvider.securityContext }}
securityContext:
{{- toYaml . | nindent 12 }}
{{- end }}
ports:
- name: http
containerPort: {{ .Values.webrtc.service.targetPort }}
containerPort: {{ .Values.yProvider.service.targetPort }}
protocol: TCP
{{- if .Values.webrtc.probes.liveness }}
{{- if .Values.yProvider.probes.liveness }}
livenessProbe:
{{- include "impress.probes.abstract" (merge .Values.webrtc.probes.liveness (dict "targetPort" .Values.webrtc.service.targetPort )) | nindent 12 }}
{{- include "impress.probes.abstract" (merge .Values.yProvider.probes.liveness (dict "targetPort" .Values.yProvider.service.targetPort )) | nindent 12 }}
{{- end }}
{{- if .Values.webrtc.probes.readiness }}
{{- if .Values.yProvider.probes.readiness }}
readinessProbe:
{{- include "impress.probes.abstract" (merge .Values.webrtc.probes.readiness (dict "targetPort" .Values.webrtc.service.targetPort )) | nindent 12 }}
{{- include "impress.probes.abstract" (merge .Values.yProvider.probes.readiness (dict "targetPort" .Values.yProvider.service.targetPort )) | nindent 12 }}
{{- end }}
{{- if .Values.webrtc.probes.startup }}
{{- if .Values.yProvider.probes.startup }}
startupProbe:
{{- include "impress.probes.abstract" (merge .Values.webrtc.probes.startup (dict "targetPort" .Values.webrtc.service.targetPort )) | nindent 12 }}
{{- include "impress.probes.abstract" (merge .Values.yProvider.probes.startup (dict "targetPort" .Values.yProvider.service.targetPort )) | nindent 12 }}
{{- end }}
{{- with .Values.webrtc.resources }}
{{- with .Values.yProvider.resources }}
resources:
{{- toYaml . | nindent 12 }}
{{- end }}
@@ -76,25 +76,25 @@ spec:
mountPath: {{ $value.path }}
subPath: content
{{- end }}
{{- range $name, $volume := .Values.webrtc.persistence }}
{{- range $name, $volume := .Values.yProvider.persistence }}
- name: "{{ $name }}"
mountPath: "{{ $volume.mountPath }}"
{{- end }}
{{- range .Values.webrtc.extraVolumeMounts }}
{{- range .Values.yProvider.extraVolumeMounts }}
- name: {{ .name }}
mountPath: {{ .mountPath }}
subPath: {{ .subPath | default "" }}
readOnly: {{ .readOnly }}
{{- end }}
{{- with .Values.webrtc.nodeSelector }}
{{- with .Values.yProvider.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.webrtc.affinity }}
{{- with .Values.yProvider.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.webrtc.tolerations }}
{{- with .Values.yProvider.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
@@ -104,7 +104,7 @@ spec:
configMap:
name: "{{ include "impress.fullname" $ }}-files-{{ $index }}"
{{- end }}
{{- range $name, $volume := .Values.webrtc.persistence }}
{{- range $name, $volume := .Values.yProvider.persistence }}
- name: "{{ $name }}"
{{- if eq $volume.type "emptyDir" }}
emptyDir: {}
@@ -113,7 +113,7 @@ spec:
claimName: "{{ $fullName }}-{{ $name }}"
{{- end }}
{{- end }}
{{- range .Values.webrtc.extraVolumes }}
{{- range .Values.yProvider.extraVolumes }}
- name: {{ .name }}
{{- if .existingClaim }}
persistentVolumeClaim:

View File

@@ -0,0 +1,21 @@
{{- $envVars := include "impress.common.env" (list . .Values.yProvider) -}}
{{- $fullName := include "impress.yProvider.fullname" . -}}
{{- $component := "yProvider" -}}
apiVersion: v1
kind: Service
metadata:
name: {{ $fullName }}
namespace: {{ .Release.Namespace | quote }}
labels:
{{- include "impress.common.labels" (list . $component) | nindent 4 }}
annotations:
{{- toYaml $.Values.yProvider.service.annotations | nindent 4 }}
spec:
type: {{ .Values.yProvider.service.type }}
ports:
- port: {{ .Values.yProvider.service.port }}
targetPort: {{ .Values.yProvider.service.targetPort }}
protocol: TCP
name: http
selector:
{{- include "impress.common.selectorLabels" (list . $component) | nindent 4 }}

View File

@@ -320,96 +320,96 @@ frontend:
## @param frontend.extraVolumes Additional volumes to mount on the frontend.
extraVolumes: []
## @section webrtc
## @section yProvider
webrtc:
## @param webrtc.image.repository Repository to use to pull impress's webrtc container image
## @param webrtc.image.tag impress's webrtc container tag
## @param webrtc.image.pullPolicy webrtc container image pull policy
yProvider:
## @param yProvider.image.repository Repository to use to pull impress's yProvider container image
## @param yProvider.image.tag impress's yProvider container tag
## @param yProvider.image.pullPolicy yProvider container image pull policy
image:
repository: lasuite/impress-y-webrtc-signaling
repository: lasuite/impress-y-provider
pullPolicy: IfNotPresent
tag: "latest"
## @param webrtc.command Override the webrtc container command
## @param yProvider.command Override the yProvider container command
command: []
## @param webrtc.args Override the webrtc container args
## @param yProvider.args Override the yProvider container args
args: []
## @param webrtc.replicas Amount of webrtc replicas
## @param yProvider.replicas Amount of yProvider replicas
replicas: 3
## @param webrtc.shareProcessNamespace Enable share process namewebrtc between containers
## @param yProvider.shareProcessNamespace Enable share process nameyProvider between containers
shareProcessNamespace: false
## @param webrtc.sidecars Add sidecars containers to webrtc deployment
## @param yProvider.sidecars Add sidecars containers to yProvider deployment
sidecars: []
## @param webrtc.securityContext Configure webrtc Pod security context
## @param yProvider.securityContext Configure yProvider Pod security context
securityContext: null
## @param webrtc.envVars Configure webrtc container environment variables
## @extra webrtc.envVars.BY_VALUE Example environment variable by setting value directly
## @extra webrtc.envVars.FROM_CONFIGMAP.configMapKeyRef.name Name of a ConfigMap when configuring env vars from a ConfigMap
## @extra webrtc.envVars.FROM_CONFIGMAP.configMapKeyRef.key Key within a ConfigMap when configuring env vars from a ConfigMap
## @extra webrtc.envVars.FROM_SECRET.secretKeyRef.name Name of a Secret when configuring env vars from a Secret
## @extra webrtc.envVars.FROM_SECRET.secretKeyRef.key Key within a Secret when configuring env vars from a Secret
## @skip webrtc.envVars
## @param yProvider.envVars Configure yProvider container environment variables
## @extra yProvider.envVars.BY_VALUE Example environment variable by setting value directly
## @extra yProvider.envVars.FROM_CONFIGMAP.configMapKeyRef.name Name of a ConfigMap when configuring env vars from a ConfigMap
## @extra yProvider.envVars.FROM_CONFIGMAP.configMapKeyRef.key Key within a ConfigMap when configuring env vars from a ConfigMap
## @extra yProvider.envVars.FROM_SECRET.secretKeyRef.name Name of a Secret when configuring env vars from a Secret
## @extra yProvider.envVars.FROM_SECRET.secretKeyRef.key Key within a Secret when configuring env vars from a Secret
## @skip yProvider.envVars
envVars:
<<: *commonEnvVars
## @param webrtc.podAnnotations Annotations to add to the webrtc Pod
## @param yProvider.podAnnotations Annotations to add to the yProvider Pod
podAnnotations: {}
## @param webrtc.service.type webrtc Service type
## @param webrtc.service.port webrtc Service listening port
## @param webrtc.service.targetPort webrtc container listening port
## @param webrtc.service.annotations Annotations to add to the webrtc Service
## @param yProvider.service.type yProvider Service type
## @param yProvider.service.port yProvider Service listening port
## @param yProvider.service.targetPort yProvider container listening port
## @param yProvider.service.annotations Annotations to add to the yProvider Service
service:
type: ClusterIP
port: 443
targetPort: 4444
annotations: {}
## @param webrtc.probes Configure probe for webrtc
## @extra webrtc.probes.liveness.path Configure path for webrtc HTTP liveness probe
## @extra webrtc.probes.liveness.targetPort Configure port for webrtc HTTP liveness probe
## @extra webrtc.probes.liveness.initialDelaySeconds Configure initial delay for webrtc liveness probe
## @extra webrtc.probes.liveness.initialDelaySeconds Configure timeout for webrtc liveness probe
## @extra webrtc.probes.startup.path Configure path for webrtc HTTP startup probe
## @extra webrtc.probes.startup.targetPort Configure port for webrtc HTTP startup probe
## @extra webrtc.probes.startup.initialDelaySeconds Configure initial delay for webrtc startup probe
## @extra webrtc.probes.startup.initialDelaySeconds Configure timeout for webrtc startup probe
## @extra webrtc.probes.readiness.path Configure path for webrtc HTTP readiness probe
## @extra webrtc.probes.readiness.targetPort Configure port for webrtc HTTP readiness probe
## @extra webrtc.probes.readiness.initialDelaySeconds Configure initial delay for webrtc readiness probe
## @extra webrtc.probes.readiness.initialDelaySeconds Configure timeout for webrtc readiness probe
## @param yProvider.probes Configure probe for yProvider
## @extra yProvider.probes.liveness.path Configure path for yProvider HTTP liveness probe
## @extra yProvider.probes.liveness.targetPort Configure port for yProvider HTTP liveness probe
## @extra yProvider.probes.liveness.initialDelaySeconds Configure initial delay for yProvider liveness probe
## @extra yProvider.probes.liveness.initialDelaySeconds Configure timeout for yProvider liveness probe
## @extra yProvider.probes.startup.path Configure path for yProvider HTTP startup probe
## @extra yProvider.probes.startup.targetPort Configure port for yProvider HTTP startup probe
## @extra yProvider.probes.startup.initialDelaySeconds Configure initial delay for yProvider startup probe
## @extra yProvider.probes.startup.initialDelaySeconds Configure timeout for yProvider startup probe
## @extra yProvider.probes.readiness.path Configure path for yProvider HTTP readiness probe
## @extra yProvider.probes.readiness.targetPort Configure port for yProvider HTTP readiness probe
## @extra yProvider.probes.readiness.initialDelaySeconds Configure initial delay for yProvider readiness probe
## @extra yProvider.probes.readiness.initialDelaySeconds Configure timeout for yProvider readiness probe
probes:
liveness:
path: /ping
initialDelaySeconds: 10
## @param webrtc.resources Resource requirements for the webrtc container
## @param yProvider.resources Resource requirements for the yProvider container
resources: {}
## @param webrtc.nodeSelector Node selector for the webrtc Pod
## @param yProvider.nodeSelector Node selector for the yProvider Pod
nodeSelector: {}
## @param webrtc.tolerations Tolerations for the webrtc Pod
## @param yProvider.tolerations Tolerations for the yProvider Pod
tolerations: []
## @param webrtc.affinity Affinity for the webrtc Pod
## @param yProvider.affinity Affinity for the yProvider Pod
affinity: {}
## @param webrtc.persistence Additional volumes to create and mount on the webrtc. Used for debugging purposes
## @extra webrtc.persistence.volume-name.size Size of the additional volume
## @extra webrtc.persistence.volume-name.type Type of the additional volume, persistentVolumeClaim or emptyDir
## @extra webrtc.persistence.volume-name.mountPath Path where the volume should be mounted to
## @param yProvider.persistence Additional volumes to create and mount on the yProvider. Used for debugging purposes
## @extra yProvider.persistence.volume-name.size Size of the additional volume
## @extra yProvider.persistence.volume-name.type Type of the additional volume, persistentVolumeClaim or emptyDir
## @extra yProvider.persistence.volume-name.mountPath Path where the volume should be mounted to
persistence: {}
## @param webrtc.extraVolumeMounts Additional volumes to mount on the webrtc.
## @param yProvider.extraVolumeMounts Additional volumes to mount on the yProvider.
extraVolumeMounts: []
## @param webrtc.extraVolumes Additional volumes to mount on the webrtc.
## @param yProvider.extraVolumes Additional volumes to mount on the yProvider.
extraVolumes: []