Skip to content

Commit 33a8a80

Browse files
committed
kubernetes pods & deplyment templates
1 parent 2583300 commit 33a8a80

5 files changed

+81
-4
lines changed

cloud/templates/capsule-demo.yaml

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
capsuleVersion: beta
2+
kind: capsule
3+
metadata:
4+
name: capsule-demo
5+
labels:
6+
app: test
7+
restartPolicy: Always
8+
spec:
9+
containers:
10+
- image: nginx
11+
imagePullPolicy: ifnotpresent
12+
workDir: /root
13+
ports:
14+
- name: nginx-port
15+
containerPort: 80
16+
hostPort: 80
17+
protocol: TCP
18+
- image: mysql:5.7
19+
imagePullPolicy: ifnotpresent
20+
ports:
21+
- name: nginx-port
22+
containerPort: 3306
23+
hostPort: 3306
24+
protocol: TCP
25+
env:
26+
MYSQL_ROOT_PASSWORD: password
27+
MYSQL_DATABASE: nginx
28+
- image: centos
29+
command:
30+
- "/bin/bash"
31+
args:
32+
- "-c"
33+
- "\"while true: do echo hello world; sleep 1; done\""
34+
imagePullPolicy: ifnotpresent
35+
workDir: /root
36+
File renamed without changes.

cloud/hot/create_private_network.yml cloud/templates/create_private_network.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ parameters:
44
public_net:
55
type: string
66
description: public network name
7-
default: admin_floating_net
7+
default: public
88
private_net_name:
99
type: string
1010
description: private network name
11-
default: net04
11+
default: private-cdr-net
1212

1313
resources:
1414
private_net:
@@ -19,8 +19,8 @@ resources:
1919
type: OS::Neutron::Subnet
2020
properties:
2121
network_id: { get_resource: private_net }
22-
cidr: 172.16.200.0/24
23-
gateway_ip: 172.16.200.1
22+
cidr: 192.168.122.0/24
23+
gateway_ip: 192.168.122.1
2424
router:
2525
type: OS::Neutron::Router
2626
properties:

cloud/templates/deployment.yaml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: nginx-deployment
5+
labels:
6+
app: nginx
7+
spec:
8+
selector:
9+
matchLabels:
10+
app: nginx
11+
replicas: 3
12+
template:
13+
metadata:
14+
labels:
15+
app: nginx
16+
spec:
17+
tolerations:
18+
- key: "virtual-kubelet.io/provider"
19+
operator: "Equal"
20+
value: "openstack"
21+
effect: "NoSchedule"
22+
containers:
23+
- name: nginx
24+
image: nginx:1.7.9
25+
ports:
26+
- containerPort: 80

cloud/templates/nginx.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: nginx3
5+
spec:
6+
tolerations:
7+
- key: "virtual-kubelet.io/provider"
8+
operator: "Equal"
9+
value: "openstack"
10+
effect: "NoSchedule"
11+
containers:
12+
- name: nginx
13+
image: nginx:latest
14+
ports:
15+
- containerPort: 80

0 commit comments

Comments
 (0)