mirror of
https://github.com/janishutz/fundamentals-of-webengineering.git
synced 2025-11-25 13:54:25 +00:00
Task 3: React Frontend
This commit is contained in:
23
task_3_react/helm/.helmignore
Normal file
23
task_3_react/helm/.helmignore
Normal file
@@ -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/
|
||||
6
task_3_react/helm/Chart.yaml
Normal file
6
task_3_react/helm/Chart.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
apiVersion: v2
|
||||
name: a3-group-g3-rbacher-jahutz #name of the app, this should be the project name, spaces should be substituted with -
|
||||
description: My Example App #description for the app
|
||||
type: application
|
||||
version: 0.0.1 #for versioning of the helm chart, increase it when new release is built/deployed
|
||||
appVersion: "0.0.1"
|
||||
0
task_3_react/helm/charts/.gitkeep
Normal file
0
task_3_react/helm/charts/.gitkeep
Normal file
0
task_3_react/helm/files/.gitkeep
Normal file
0
task_3_react/helm/files/.gitkeep
Normal file
0
task_3_react/helm/templates/.gitkeep
Normal file
0
task_3_react/helm/templates/.gitkeep
Normal file
56
task_3_react/helm/templates/deployment.yaml
Normal file
56
task_3_react/helm/templates/deployment.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-webapp
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: {{ .Release.Name }}-webapp
|
||||
replicas: 1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ .Release.Name }}-webapp
|
||||
annotations:
|
||||
rollme: {{ randAlphaNum 5 | quote }}
|
||||
spec:
|
||||
imagePullSecrets:
|
||||
- name: regcred
|
||||
containers:
|
||||
- name: {{ .Release.Name }}-webapp
|
||||
image: {{ .Values.image.name }}-webapp:{{ .Values.image.tag }}
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 5173
|
||||
resources:
|
||||
limits:
|
||||
memory: "250M"
|
||||
requests:
|
||||
memory: "100M"
|
||||
commnand: ["npm", "run", "dev"]
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /app/vite.config.js
|
||||
subPath: vite.config.js
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: {{ .Release.Name }}-webapp-config
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-webapp-config
|
||||
data:
|
||||
vite.config.js: |
|
||||
export default {
|
||||
server: {
|
||||
host: '0.0.0.0',
|
||||
port: 5173,
|
||||
allowedHosts: true,
|
||||
watch: {
|
||||
usePolling: true,
|
||||
interval: 1000,
|
||||
},
|
||||
},
|
||||
}
|
||||
24
task_3_react/helm/templates/ingress.yaml
Normal file
24
task_3_react/helm/templates/ingress.yaml
Normal file
@@ -0,0 +1,24 @@
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-ingress
|
||||
annotations:
|
||||
nginx.ingress.kubernetes.io/enable-cors: "true"
|
||||
cert-manager.io/cluster-issuer: letsencrypt-prod
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
tls:
|
||||
- hosts:
|
||||
- {{ .Values.url.hostname.uri }}.{{ .Values.url.hostname.base_uri }}
|
||||
secretName: {{ .Release.Name }}-tls
|
||||
rules:
|
||||
- host: {{ .Values.url.hostname.uri }}.{{ .Values.url.hostname.base_uri }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: {{ .Release.Name }}-webapp
|
||||
port:
|
||||
number: 80
|
||||
10
task_3_react/helm/templates/service.yaml
Normal file
10
task_3_react/helm/templates/service.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ .Release.Name }}-webapp
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: 5173
|
||||
selector:
|
||||
app: {{ .Release.Name }}-webapp
|
||||
10
task_3_react/helm/values.yaml
Normal file
10
task_3_react/helm/values.yaml
Normal file
@@ -0,0 +1,10 @@
|
||||
image:
|
||||
name: ""
|
||||
tag: ""
|
||||
build:
|
||||
job_id: ""
|
||||
commit: ""
|
||||
url:
|
||||
hostname:
|
||||
base_uri: "webdev-25.ivia.isginf.ch"
|
||||
uri: ""
|
||||
Reference in New Issue
Block a user