-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtestpod-deployment.yaml
More file actions
27 lines (27 loc) · 928 Bytes
/
testpod-deployment.yaml
File metadata and controls
27 lines (27 loc) · 928 Bytes
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
apiVersion: v1
kind: Pod
metadata:
namespace: master
name: test-deployment
spec:
activeDeadlineSeconds: 26
restartPolicy: Never
containers:
- imagePullPolicy: IfNotPresent
name: deployment-status
image: devorbitus/ubuntu-bash-jq-curl
command:
- "/bin/bash"
- "-c"
env:
- name: namespace
value: master
- name: deployment
value: wordpress
args:
- 'url="https://${KUBERNETES_PORT_443_TCP_ADDR}:${KUBERNETES_SERVICE_PORT_HTTPS}/apis/extensions/v1beta1/namespaces/${namespace}/deployments/${deployment}/status";
curl --silent -k -X GET -H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)"
-H ''Accept: application/json'' $url -o output.txt; result=$( jq -r ''.status.conditions[0].status''
output.txt); [[ $? != 0 ]] && abc || [[ $result == True ]] && echo True || False '
imagePullSecrets:
- name: registrysecret