Skip to content

Commit

Permalink
Add basic backend
Browse files Browse the repository at this point in the history
  • Loading branch information
TwoDCube committed Nov 26, 2024
1 parent 7b89548 commit 511e47f
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 70 deletions.
4 changes: 2 additions & 2 deletions charts/iam/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.14
version: 0.1.15

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v2"
appVersion: "v3"
8 changes: 1 addition & 7 deletions charts/iam/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,6 @@ image:
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
mysql:
repository: mysql
# This sets the pull policy for images.
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: "8"

# This is for the secretes for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/
imagePullSecrets: []
Expand Down Expand Up @@ -77,7 +71,7 @@ service:

# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/
ingress:
enabled: true
enabled: false
className: ""
annotations: {}
hosts:
Expand Down
4 changes: 2 additions & 2 deletions charts/matverseny-backend/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
version: 0.1.1

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.16.0"
appVersion: "v1"
14 changes: 12 additions & 2 deletions charts/matverseny-backend/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@ metadata:
labels:
{{- include "matverseny-backend.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "matverseny-backend.selectorLabels" . | nindent 6 }}
strategy:
type: RollingUpdate
rollingUpdate:
maxSurge: 0
maxUnavailable: 1
template:
metadata:
{{- with .Values.podAnnotations }}
Expand Down Expand Up @@ -66,3 +69,10 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
topologySpreadConstraints:
- maxSkew: 1
topologyKey: {{ .Values.topologySpreadConstraints.topologyKey }}
whenUnsatisfiable: DoNotSchedule
labelSelector:
matchLabels:
{{- include "iam.selectorLabels" . | nindent 14 }}
32 changes: 0 additions & 32 deletions charts/matverseny-backend/templates/hpa.yaml

This file was deleted.

47 changes: 23 additions & 24 deletions charts/matverseny-backend/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
# Declare variables to be passed into your templates.

# This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/
replicaCount: 1
replicaCount: 3

# This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/
image:
repository: nginx
repository: ghcr.io/verseghy/matverseny-backend
# This sets the pull policy for images.
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
Expand Down Expand Up @@ -38,31 +38,29 @@ podAnnotations: {}
# For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
podLabels: {}

podSecurityContext: {}
# fsGroup: 2000
podSecurityContext:
fsGroup: 2000

securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
securityContext:
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
runAsNonRoot: true
runAsUser: 1000

# This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/
service:
# This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
type: ClusterIP
# This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
port: 80
port: 3002

# This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/
ingress:
enabled: false
className: ""
annotations: {}
# kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true"
hosts:
- host: chart-example.local
paths:
Expand All @@ -88,21 +86,13 @@ resources: {}
# This is to setup the liveness and readiness probes more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-startup-probes/
livenessProbe:
httpGet:
path: /
path: /liveness
port: http
readinessProbe:
httpGet:
path: /
path: /readiness
port: http

#This section is for setting up autoscaling more information can be found here: https://kubernetes.io/docs/concepts/workloads/autoscaling/
autoscaling:
enabled: false
minReplicas: 1
maxReplicas: 100
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

# Additional volumes on the output Deployment definition.
volumes: []
# - name: foo
Expand All @@ -121,3 +111,12 @@ nodeSelector: {}
tolerations: []

affinity: {}

topologySpreadConstraints:
topologyKey: kubernetes.io/hostname

database:
main:
storage: 1Gi
backup:
storage: 1Gi
32 changes: 32 additions & 0 deletions charts/matverseny/templates/matverseny-backend.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: matverseny-backend
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: https://verseghy.github.io/charts/
chart: matverseny-backend
targetRevision: 0.1.1
helm:
valuesObject:
ingress:
annotations:
cert-manager.io/issuer: letsencrypt-prod
enabled: true
hosts:
- host: api.{{ .Values.hostname }}
paths:
- path: /
pathType: ImplementationSpecific
tls:
- hosts:
- api.{{ .Values.hostname }}
secretName: matverseny-frontend-tls
destination:
server: https://kubernetes.default.svc
namespace: {{ .Values.namespace }}
syncPolicy:
automated: {}
2 changes: 1 addition & 1 deletion charts/matverseny/templates/matverseny-iam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
source:
repoURL: https://verseghy.github.io/charts/
chart: iam
targetRevision: 0.1.14
targetRevision: 0.1.15
helm:
valuesObject:
ingress:
Expand Down

0 comments on commit 511e47f

Please sign in to comment.