istio improvements
This commit is contained in:
parent
d7ad6c44bd
commit
97addda5f4
13 changed files with 388 additions and 7 deletions
74
testapp/redirect/redirect.yaml
Normal file
74
testapp/redirect/redirect.yaml
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: redirect
|
||||
namespace: redirect
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: nginx-config
|
||||
namespace: redirect
|
||||
data:
|
||||
nginx.conf: |
|
||||
server {
|
||||
listen 80 default_server;
|
||||
server_name _;
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: redirect
|
||||
namespace: redirect
|
||||
labels:
|
||||
app: redirect
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
name: http
|
||||
selector:
|
||||
app: redirect
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: redirect
|
||||
namespace: redirect
|
||||
labels:
|
||||
app: redirect
|
||||
version: v1
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: redirect
|
||||
version: v1
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: redirect
|
||||
version: v1
|
||||
spec:
|
||||
serviceAccountName: redirect
|
||||
containers:
|
||||
- name: redirect
|
||||
image: nginx:stable
|
||||
resources:
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
imagePullPolicy: IfNotPresent
|
||||
ports:
|
||||
- containerPort: 80
|
||||
volumeMounts:
|
||||
- mountPath: /etc/nginx/conf.d
|
||||
name: config
|
||||
volumes:
|
||||
- name: config
|
||||
configMap:
|
||||
name: nginx-config
|
||||
Loading…
Add table
Add a link
Reference in a new issue