File tree Expand file tree Collapse file tree 2 files changed +72
-0
lines changed
Expand file tree Collapse file tree 2 files changed +72
-0
lines changed Original file line number Diff line number Diff line change 1+ apiVersion : batch/v1
2+ kind : CronJob
3+ metadata :
4+ name : telnet-10.20.30.40
5+ namespace : devops-tools
6+ spec :
7+ schedule : ' */10 * * * *'
8+ concurrencyPolicy : Allow
9+ suspend : false
10+ jobTemplate :
11+ spec :
12+ template :
13+ spec :
14+ containers :
15+ - name : telnet01
16+ image : devopscorner/cicd:alpine
17+ command :
18+ - /bin/sh
19+ - ' -c'
20+ args :
21+ - >-
22+ DATE=$(date '+%Y-%m-%d %H:%M') ; mkdir /var/log/containers/ ;
23+ date | tee /var/log/containers/telnet-$DATE; /usr/bin/telnet
24+ 10.20.30.40 443 | tee -a /var/log/containers/telnet-$DATE;
25+ cat /var/log/containers/telnet-$DATE;
26+ resources : {}
27+ terminationMessagePath : /dev/termination-log
28+ terminationMessagePolicy : File
29+ imagePullPolicy : IfNotPresent
30+ restartPolicy : OnFailure
31+ terminationGracePeriodSeconds : 30
32+ dnsPolicy : ClusterFirst
33+ securityContext : {}
34+ schedulerName : default-scheduler
35+ successfulJobsHistoryLimit : 1
36+ failedJobsHistoryLimit : 1
Original file line number Diff line number Diff line change 1+ apiVersion : batch/v1
2+ kind : CronJob
3+ metadata :
4+ name : telnet-10.20.30.40
5+ namespace : devops-tools
6+ spec :
7+ schedule : ' */10 0-14 * * 1-5'
8+ concurrencyPolicy : Allow
9+ suspend : false
10+ jobTemplate :
11+ spec :
12+ template :
13+ spec :
14+ containers :
15+ - name : telnet02
16+ image : devopscorner/cicd:alpine
17+ command :
18+ - /bin/sh
19+ - ' -c'
20+ args :
21+ - >-
22+ DATE=$(date '+%Y-%m-%d %H:%M') ; mkdir /var/log/containers/ ;
23+ date | tee /var/log/containers/telnet-$DATE; /usr/bin/telnet
24+ 10.20.30.40 443 | tee -a /var/log/containers/telnet-$DATE;
25+ cat /var/log/containers/telnet-$DATE;
26+ resources : {}
27+ terminationMessagePath : /dev/termination-log
28+ terminationMessagePolicy : File
29+ imagePullPolicy : IfNotPresent
30+ restartPolicy : OnFailure
31+ terminationGracePeriodSeconds : 30
32+ dnsPolicy : ClusterFirst
33+ securityContext : {}
34+ schedulerName : default-scheduler
35+ successfulJobsHistoryLimit : 1
36+ failedJobsHistoryLimit : 1
You can’t perform that action at this time.
0 commit comments