Skip to content

Commit

Permalink
add app
Browse files Browse the repository at this point in the history
  • Loading branch information
OriHoch committed Aug 29, 2023
1 parent 4cc895c commit 093a3e6
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 0 deletions.
3 changes: 3 additions & 0 deletions infra/app/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name: ui
version: "v0.0.0"
apiVersion: v2
21 changes: 21 additions & 0 deletions infra/app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# CKANGPT UI

## Deploy

Deployment is handled via ArgoCD

## Secrets

```
kubectl create secret docker-registry ghcr-pull-secret \
--docker-server=ghcr.io \
--docker-username=<github-username> \
--docker-password=<github-personal-access-token> \
--namespace=ui
```

```
htpasswd -c auth <USERNAME>
kubectl -n ui create secret generic basic-auth --from-file=auth
rm auth
```
22 changes: 22 additions & 0 deletions infra/app/templates/ui-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: ui
spec:
selector:
matchLabels:
app: ui
replicas: 1
revisionHistoryLimit: 2
template:
metadata:
labels:
app: ui
spec:
terminationGracePeriodSeconds: 2
imagePullSecrets:
- name: ghcr-pull-secret
containers:
- name: ui
image: {{ .Values.ui.image | quote }}
resources: {{ toYaml .Values.ui.resources | nindent 10 }}
26 changes: 26 additions & 0 deletions infra/app/templates/ui-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ui
annotations:
kubernetes.io/ingress.class: "nginx"
cert-manager.io/cluster-issuer: "letsencrypt"
nginx.ingress.kubernetes.io/auth-type: basic
nginx.ingress.kubernetes.io/auth-secret: basic-auth
nginx.ingress.kubernetes.io/proxy-body-size: "500m"
spec:
tls:
- hosts:
- ckangpt-ui.uumpa.xyz
secretName: chroma-ingress-tls
rules:
- host: ckangpt-ui.uumpa.xyz
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: ui
port:
number: 80
10 changes: 10 additions & 0 deletions infra/app/templates/ui-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: ui
spec:
selector:
app: ui
ports:
- name: "80"
port: 80
3 changes: 3 additions & 0 deletions infra/app/values.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
api:
image: ghcr.io/whiletrue-industries/ckangpt-ui/ckangpt-ui:latest
resources: {}

0 comments on commit 093a3e6

Please sign in to comment.