Add example-app .
This commit is contained in:
40
apps/example-app/deployment.yaml
Normal file
40
apps/example-app/deployment.yaml
Normal file
@@ -0,0 +1,40 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: example-app
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: example-app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: example-app
|
||||
spec:
|
||||
containers:
|
||||
- name: example-app
|
||||
image: nginx:alpine
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 128Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 32Mi
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
31
apps/example-app/ingress.yaml
Normal file
31
apps/example-app/ingress.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: example-app
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/target: {{ (ds "config").cloud.domain }}
|
||||
external-dns.alpha.kubernetes.io/cloudflare-proxied: false
|
||||
|
||||
# Optional: Enable HTTPS redirection
|
||||
traefik.ingress.kubernetes.io/redirect-entry-point: https
|
||||
|
||||
# Optional: Enable basic auth
|
||||
# traefik.ingress.kubernetes.io/auth-type: basic
|
||||
# traefik.ingress.kubernetes.io/auth-secret: basic-auth
|
||||
spec:
|
||||
rules:
|
||||
- host: example-app.{{ (ds "config").cloud.domain }}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: example-app
|
||||
port:
|
||||
number: 80
|
||||
tls:
|
||||
- hosts:
|
||||
- example-app.{{ (ds "config").cloud.domain }}
|
||||
secretName: wildcard-wild-cloud-tls
|
14
apps/example-app/kustomization.yaml
Normal file
14
apps/example-app/kustomization.yaml
Normal file
@@ -0,0 +1,14 @@
|
||||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
namespace: example-app
|
||||
labels:
|
||||
- includeSelectors: true
|
||||
pairs:
|
||||
app: example-app
|
||||
managedBy: kustomize
|
||||
partOf: wild-cloud
|
||||
resources:
|
||||
- deployment.yaml
|
||||
- ingress.yaml
|
||||
- namespace.yaml
|
||||
- service.yaml
|
4
apps/example-app/manifest.yaml
Normal file
4
apps/example-app/manifest.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
name: example-app
|
||||
install: true
|
||||
description: An example application that is deployed with public access.
|
||||
version: 1.0.0
|
4
apps/example-app/namespace.yaml
Normal file
4
apps/example-app/namespace.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: example-app
|
@@ -1,57 +1,8 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: example-app
|
||||
namespace: default
|
||||
labels:
|
||||
app: example-app
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: example-app
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: example-app
|
||||
spec:
|
||||
containers:
|
||||
- name: example-app
|
||||
image: nginx:alpine
|
||||
imagePullPolicy: Always
|
||||
ports:
|
||||
- containerPort: 80
|
||||
resources:
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 30
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /
|
||||
port: 80
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
env:
|
||||
- name: ENV_VARIABLE
|
||||
value: "ENV_VALUE"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: example-app
|
||||
namespace: default
|
||||
labels:
|
||||
app: example-app
|
||||
spec:
|
||||
selector:
|
||||
app: example-app
|
||||
@@ -59,35 +10,3 @@ spec:
|
||||
- port: 80
|
||||
targetPort: 80
|
||||
name: http
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: example-app
|
||||
namespace: default
|
||||
annotations:
|
||||
external-dns.alpha.kubernetes.io/target: "${DOMAIN}"
|
||||
external-dns.alpha.kubernetes.io/cloudflare-proxied: "false"
|
||||
|
||||
# Optional: Enable HTTPS redirection
|
||||
traefik.ingress.kubernetes.io/redirect-entry-point: https
|
||||
|
||||
# Optional: Enable basic auth
|
||||
# traefik.ingress.kubernetes.io/auth-type: basic
|
||||
# traefik.ingress.kubernetes.io/auth-secret: basic-auth
|
||||
spec:
|
||||
rules:
|
||||
- host: example-app.${DOMAIN}
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: example-app
|
||||
port:
|
||||
number: 80
|
||||
tls:
|
||||
- hosts:
|
||||
- example-app.${DOMAIN}
|
||||
secretName: wildcard-wild-cloud-tls
|
||||
|
Reference in New Issue
Block a user