forked from solarhess/jenkins_kube_brains
-
Notifications
You must be signed in to change notification settings - Fork 0
/
helloworld.yaml
81 lines (78 loc) · 1.87 KB
/
helloworld.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# See https://cert-manager.readthedocs.io/en/latest/reference/ingress-shim.html
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
# add an annotation indicating the issuer to use.
certmanager.k8s.io/cluster-issuer: letsencrypt-staging
name: helloworld
namespace: default
spec:
rules:
- host: helloworld.kubecon2018.jonathanhess.com
http:
paths:
- backend:
serviceName: helloworldservice
servicePort: 80
path: /
tls: # < placing a host in the TLS config will indicate a cert should be created
- hosts:
- helloworld.kubecon2018.jonathanhess.com
secretName: helloworld-cert # < cert-manager will store the created certificate in this secret.
---
apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-webroot
namespace: default
data:
index.html: |
<html>
<head>
<title>Hello World Jenkins Brains</title>
</head>
<body>
<h1>Hello World Jenkins Brains</h1>
<p>This makes sure that your jenkins brains cluster actually works</p>
</body>
</html>,
---
# Inspiration from Kelsey Hightower hello world
# See https://github.com/kelseyhightower/kubernetes-initializer-tutorial/blob/master/deployments/helloworld.yaml
apiVersion: apps/v1beta1
kind: Deployment
metadata:
labels:
app: helloworld
name: helloworld
spec:
replicas: 1
template:
metadata:
labels:
app: helloworld
name: helloworld
spec:
containers:
- name: helloworld
image: nginx
volumeMounts:
- mountPath: /usr/share/nginx/html
name: nginx-webroot
volumes:
- name: nginx-webroot
configMap:
name: nginx-webroot
---
kind: Service
apiVersion: v1
metadata:
name: helloworldservice
spec:
selector:
app: helloworld
ports:
- protocol: TCP
port: 80
targetPort: 80