Deploy Symcrest public website

This commit is contained in:
Arvind Prabhakar 2026-08-16 02:08:57 +00:00
commit 6bdb9b0d4a
8 changed files with 247 additions and 0 deletions

View file

@ -0,0 +1,18 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: symcrest-web
namespace: argocd
spec:
project: platform
source:
repoURL: https://www.symcrest.com/internal/dev/git/symcrest/k8s-platform.git
targetRevision: main
path: rendered/symcrest-web
destination:
server: https://kubernetes.default.svc
namespace: apps
syncPolicy:
automated:
prune: false
selfHeal: true

View file

@ -0,0 +1,6 @@
apiVersion: v2
name: symcrest-web
description: Symcrest public web application
type: application
version: 0.1.0
appVersion: "1.0.0"

View file

@ -0,0 +1,44 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: symcrest-web
namespace: {{ .Values.namespace }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: symcrest-web
template:
metadata:
labels:
app: symcrest-web
spec:
imagePullSecrets:
- name: forgejo-registry
containers:
- name: symcrest-web
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
ports:
- name: http
containerPort: {{ .Values.service.targetPort }}
protocol: TCP
env:
- name: HOST
value: "0.0.0.0"
- name: PORT
value: "{{ .Values.service.targetPort }}"
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 10
periodSeconds: 20
resources:
{{ toYaml .Values.resources | indent 12 }}

View file

@ -0,0 +1,21 @@
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: {{ .Values.route.name }}
namespace: {{ .Values.namespace }}
spec:
parentRefs:
- name: {{ .Values.route.gatewayName }}
namespace: {{ .Values.route.gatewayNamespace }}
hostnames:
{{- range .Values.route.hostnames }}
- {{ . | quote }}
{{- end }}
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: {{ .Values.service.name }}
port: {{ .Values.service.port }}

View file

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.service.name }}
namespace: {{ .Values.namespace }}
spec:
selector:
app: symcrest-web
ports:
- name: http
port: {{ .Values.service.port }}
targetPort: {{ .Values.service.targetPort }}
protocol: TCP

View file

@ -0,0 +1,28 @@
namespace: apps
replicaCount: 2
image:
repository: www.symcrest.com/symcrest/symcrest-web
tag: "1.0.0"
pullPolicy: IfNotPresent
service:
name: symcrest-web
port: 80
targetPort: 3000
route:
name: symcrest-web
gatewayName: public-gateway
gatewayNamespace: apps
hostnames:
- www.symcrest.com
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 250m
memory: 256Mi

View file

@ -0,0 +1,30 @@
apiVersion: external-secrets.io/v1
kind: ExternalSecret
metadata:
name: forgejo-registry
namespace: apps
spec:
refreshInterval: 1h
secretStoreRef:
name: aws-secrets-manager
kind: ClusterSecretStore
target:
name: forgejo-registry
creationPolicy: Owner
template:
engineVersion: v2
type: kubernetes.io/dockerconfigjson
data:
.dockerconfigjson: |
{
"auths": {
"www.symcrest.com": {
"username": "{{ .username }}",
"password": "{{ .password }}",
"auth": "{{ printf "%s:%s" .username .password | b64enc }}"
}
}
}
dataFrom:
- extract:
key: symcrest/prod/forgejo/registry

View file

@ -0,0 +1,87 @@
---
# Source: symcrest-web/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: symcrest-web
namespace: apps
spec:
selector:
app: symcrest-web
ports:
- name: http
port: 80
targetPort: 3000
protocol: TCP
---
# Source: symcrest-web/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: symcrest-web
namespace: apps
spec:
replicas: 2
selector:
matchLabels:
app: symcrest-web
template:
metadata:
labels:
app: symcrest-web
spec:
imagePullSecrets:
- name: forgejo-registry
containers:
- name: symcrest-web
image: "www.symcrest.com/symcrest/symcrest-web:1.0.0"
imagePullPolicy: IfNotPresent
ports:
- name: http
containerPort: 3000
protocol: TCP
env:
- name: HOST
value: "0.0.0.0"
- name: PORT
value: "3000"
readinessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 5
periodSeconds: 10
livenessProbe:
httpGet:
path: /
port: http
initialDelaySeconds: 10
periodSeconds: 20
resources:
limits:
cpu: 250m
memory: 256Mi
requests:
cpu: 50m
memory: 64Mi
---
# Source: symcrest-web/templates/httproute.yaml
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: symcrest-web
namespace: apps
spec:
parentRefs:
- name: public-gateway
namespace: apps
hostnames:
- "www.symcrest.com"
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: symcrest-web
port: 80