-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
159 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
resources: | ||
- ../prod | ||
patches: | ||
- target: | ||
version: v1 | ||
kind: Service | ||
name: typetunerweb | ||
path: nodeport_service.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
- op: add | ||
path: /spec/type | ||
value: NodePort | ||
- op: add | ||
path: /spec/ports/0/nodePort | ||
value: 30080 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: typetunerweb | ||
spec: | ||
replicas: 1 | ||
strategy: | ||
type: Recreate | ||
template: | ||
metadata: | ||
name: typetunerweb | ||
spec: | ||
restartPolicy: Always | ||
containers: | ||
- name: sync-tunable-fonts-repo | ||
image: registry.k8s.io/git-sync/git-sync:v4.1.0 | ||
imagePullPolicy: IfNotPresent | ||
args: | ||
- '--repo=https://github.com/silnrsi/typetunerweb' | ||
- '--depth=1' | ||
- '--root=/mnt' | ||
- '--period=10m' | ||
volumeMounts: | ||
- mountPath: /mnt | ||
name: typetuner-repo | ||
resources: &git-sync-resources | ||
requests: | ||
memory: "128Mi" | ||
limits: | ||
memory: "128Mi" | ||
|
||
- name: app | ||
image: ghcr.io/silnrsi/typetunerweb:latest | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- containerPort: 9000 | ||
name: fastcgi | ||
protocol: TCP | ||
volumeMounts: | ||
- mountPath: /tunable-fonts | ||
name: typetuner-repo | ||
subPath: typetunerweb/web/server/TypeTuner/tunable-fonts | ||
readOnly: true | ||
resources: | ||
requests: | ||
memory: "64Mi" | ||
limits: | ||
memory: "64Mi" | ||
|
||
- name: proxy | ||
image: nginx:mainline-alpine-slim | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- containerPort: 80 | ||
name: http | ||
protocol: TCP | ||
volumeMounts: | ||
- name: nginx-config | ||
mountPath: /etc/nginx/conf.d | ||
readOnly: true | ||
resources: | ||
requests: | ||
memory: "24Mi" | ||
limits: | ||
memory: "24Mi" | ||
initContainers: | ||
- name: sync-init-tunable-fonts-repo | ||
image: registry.k8s.io/git-sync/git-sync:v4.1.0 | ||
imagePullPolicy: IfNotPresent | ||
args: | ||
- '--repo=https://github.com/silnrsi/typetunerweb' | ||
- '--one-time' | ||
- '--depth=1' | ||
- '--root=/mnt' | ||
- '--period=10m' | ||
volumeMounts: | ||
- mountPath: /mnt | ||
name: typetuner-repo | ||
resources: *git-sync-resources | ||
|
||
volumes: | ||
- name: typetuner-repo | ||
emptyDir: | ||
sizeLimit: 500Mi | ||
- name: nginx-config | ||
configMap: | ||
name: typetunerweb | ||
items: | ||
- key: nginx.default.conf | ||
path: default.conf | ||
mode: 420 |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
namespace: wstech | ||
commonLabels: | ||
app: typetunerweb | ||
resources: | ||
- deployment.yaml | ||
- service.yaml | ||
configMapGenerator: | ||
- name: typetunerweb | ||
namespace: wstech | ||
files: | ||
- nginx.default.conf | ||
generatorOptions: | ||
disableNameSuffixHash: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
server { | ||
listen 80; | ||
server_name localhost; | ||
index index.html; | ||
root /var/www; | ||
|
||
location / { | ||
root /usr/share/nginx/html; | ||
index index.html index.htm; | ||
} | ||
|
||
#error_page 404 /404.html; | ||
|
||
# redirect server error pages to the static page /50x.html | ||
# | ||
error_page 500 502 503 504 /50x.html; | ||
location = /50x.html { | ||
root /usr/share/nginx/html; | ||
} | ||
|
||
location ~ /ttw/fonts[23]go\.cgi$ { | ||
include /etc/nginx/fastcgi_params; | ||
fastcgi_param SERVER_NAME $http_host; | ||
fastcgi_pass localhost:9000; | ||
} | ||
error_log /var/log/nginx/error.log; | ||
access_log /var/log/nginx/access.log; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
labels: | ||
run: typetunerweb | ||
name: typetunerweb | ||
spec: | ||
ports: | ||
- name: http | ||
port: 80 | ||
protocol: TCP | ||
selector: | ||
app: typetunerweb |