Федоров Дмитрий 2023-11-07 18:40:41 +03:00
parent 3bcda5c2c9
commit ee8218ebcc
3 changed files with 0 additions and 156 deletions

View File

@ -1,33 +0,0 @@
---
title: configmap-conf
description:
published: true
date: 2023-11-07T15:24:04.747Z
tags:
editor: markdown
dateCreated: 2023-11-07T15:24:00.435Z
---
```yaml
---
kind: ConfigMap
apiVersion: v1
metadata:
name: openresty-conf
data:
default.conf: |
server {
listen 80;
server_name localhost;
location / {
root /usr/local/openresty/nginx/html;
index index.html index.htm;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/openresty/nginx/html;
}
}
```

View File

@ -1,50 +0,0 @@
---
title: configmap-html
description:
published: true
date: 2023-11-07T15:28:12.235Z
tags:
editor: markdown
dateCreated: 2023-11-07T15:28:08.083Z
---
```yaml
---
kind: ConfigMap
apiVersion: v1
metadata:
name: openresty-html
data:
index.html: |
<html>
<head>
<title>Тестовая страница</title>
<meta charset="UTF-8">
</head>
<body>
<h1>Тестовая страница</h1>
</body>
</html>
50x.html: |
<!DOCTYPE html>
<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
<meta content="utf-8" http-equiv="encoding">
<title>Error</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>An error occurred.</h1>
<p>Sorry, the page you are looking for is currently unavailable.<br/>
Please try again later.</p>
</body>
</html>
```

View File

@ -1,73 +0,0 @@
---
title: deployment
description:
published: true
date: 2023-11-07T15:33:48.907Z
tags:
editor: markdown
dateCreated: 2023-11-07T15:33:44.714Z
---
```yaml
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: openresty
labels:
k8s-app: openresty
annotations:
reloader.stakater.com/auto: "true"
configmap.reloader.stakater.com/reload: "openresty"
spec:
replicas: 2
revisionHistoryLimit: 3
selector:
matchLabels:
k8s-app: openresty
template:
metadata:
labels:
k8s-app: openresty
spec:
containers:
- name: openresty
image: openresty/openresty:centos-rpm
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
name: http
readinessProbe:
httpGet:
path: /index.html
port: http
initialDelaySeconds: 5
periodSeconds: 15
livenessProbe:
httpGet:
path: /index.html
port: http
initialDelaySeconds: 5
periodSeconds: 15
timeoutSeconds: 5
resources:
limits:
cpu: "0.2"
memory: "400Mi"
requests:
cpu: "0.1"
memory: "200Mi"
volumeMounts:
- name: html
mountPath: /usr/local/openresty/nginx/html/
- name: config
mountPath: /etc/nginx/conf.d/
volumes:
- name: html
configMap:
name: openresty-html
- name: config
configMap:
name: openresty-conf
```