-
Notifications
You must be signed in to change notification settings - Fork 0
/
backup-deployment.yaml
163 lines (162 loc) · 4.26 KB
/
backup-deployment.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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
apiVersion: v1
kind: Template
metadata:
name: http-backup-deployment
objects:
- apiVersion: v1
kind: DeploymentConfig
metadata:
creationTimestamp: null
generation: 1
labels:
app: ${APPLICATION_NAME}
application: ${APPLICATION_NAME}
template: jws31-tomcat8-basic-s2i
xpaas: 1.4.12
name: ${APPLICATION_NAME}
spec:
replicas: 1
selector:
deploymentConfig: ${APPLICATION_NAME}
strategy:
activeDeadlineSeconds: 21600
recreateParams:
timeoutSeconds: 600
resources: {}
type: Recreate
template:
metadata:
creationTimestamp: null
labels:
app: ${APPLICATION_NAME}
application: ${APPLICATION_NAME}
deploymentConfig: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
containers:
- env:
- name: JWS_ADMIN_USERNAME
value: VnTsjJjY
- name: JWS_ADMIN_PASSWORD
value: xfnfyTKW
image: docker-registry.default.svc:5000/${NAMESPACE}/${APPLICATION_NAME}@sha256:e0f4677bc857ed2039efeab172df7d04ec9fb7b5e08bd8c111024b9cf8bf4813
imagePullPolicy: Always
name: ${APPLICATION_NAME}
ports:
- containerPort: 8778
name: jolokia
protocol: TCP
- containerPort: 8080
name: http
protocol: TCP
readinessProbe:
exec:
command:
- /bin/bash
- -c
- curl --noproxy '*' -s -u VnTsjJjY:xfnfyTKW 'http://localhost:8080/manager/jmxproxy/?get=Catalina%3Atype%3DServer&att=stateName'
|grep -iq 'stateName *= *STARTED'
failureThreshold: 3
periodSeconds: 10
successThreshold: 1
timeoutSeconds: 1
resources: {}
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
volumeMounts:
- mountPath: /home/jboss/target
name: data-backup-storage
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
securityContext: {}
terminationGracePeriodSeconds: 60
volumes:
- name: data-backup-storage
persistentVolumeClaim:
claimName: data-backup-claim
test: false
triggers:
- imageChangeParams:
automatic: true
containerNames:
- ${APPLICATION_NAME}
from:
kind: ImageStreamTag
name: ${APPLICATION_NAME}:latest
namespace: ${NAMESPACE}
type: ImageChange
- type: ConfigChange
status:
availableReplicas: 0
latestVersion: 0
observedGeneration: 0
replicas: 0
unavailableReplicas: 0
updatedReplicas: 0
- apiVersion: v1
kind: Route
metadata:
annotations:
description: Route for application's http service.
openshift.io/host.generated: "true"
creationTimestamp: null
labels:
app: ${APPLICATION_NAME}
application: ${APPLICATION_NAME}
template: jws31-tomcat8-basic-s2i
xpaas: 1.4.12
name: ${APPLICATION_NAME}
spec:
path: "/http-backup"
to:
kind: Service
name: ${APPLICATION_NAME}
weight: 100
wildcardPolicy: None
- apiVersion: v1
kind: Service
metadata:
annotations:
description: The web server's http port.
creationTimestamp: null
labels:
app: ${APPLICATION_NAME}
application: ${APPLICATION_NAME}
template: jws31-tomcat8-basic-s2i
xpaas: 1.4.12
name: ${APPLICATION_NAME}
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
deploymentConfig: ${APPLICATION_NAME}
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: data-backup-claim
annotations:
volume.beta.kubernetes.io/storage-class: standard
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
parameters:
- description: The name for the application.
displayName: Application name
name: APPLICATION_NAME
required: true
value: http-backup
- description: The namespace for the application.
displayName: Namespace
name: NAMESPACE
required: true
value: openshift