Skip to content

Commit 6d787ba

Browse files
committed
added new version for cronjob/job chart
1 parent a402771 commit 6d787ba

22 files changed

+1823
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"server":{"deployment":{"image_tag":"{{.Tag}}","image":"{{.Name}}"}},"pipelineName": "{{.PipelineName}}","releaseVersion":"{{.ReleaseVersion}}","deploymentType": "{{.DeploymentType}}", "app": "{{.App}}", "env": "{{.Env}}", "appMetrics": {{.AppMetrics}}}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
apiVersion: v1
2+
appVersion: "1.0"
3+
description: A Helm chart for Kubernetes
4+
name: cronjob-chart_1-4-0
5+
version: 1.4.0
Lines changed: 144 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
# Mandatory configs
2+
kind: Job
3+
4+
jobConfigs:
5+
backoffLimit: 5
6+
activeDeadlineSeconds: 100
7+
parallelism: 1
8+
completions: 2
9+
suspend: false
10+
ttlSecondsAfterFinished: 100
11+
12+
cronjobConfigs:
13+
schedule: "* * * * *"
14+
startingDeadlineSeconds: 100
15+
parallelism: 1
16+
concurrencyPolicy: Allow
17+
suspend: false
18+
successfulJobsHistoryLimit: 3
19+
failedJobsHistoryLimit: 1
20+
restartPolicy: OnFailure
21+
22+
MinReadySeconds: 60
23+
GracePeriod: 30
24+
image:
25+
pullPolicy: IfNotPresent
26+
service:
27+
type: ClusterIP
28+
#name: "service-1234567890"
29+
annotations: {}
30+
# test1: test2
31+
# test3: test4
32+
ContainerPort:
33+
- name: app
34+
port: 8080
35+
servicePort: 80
36+
envoyPort: 8799
37+
useHTTP2: true
38+
supportStreaming: true
39+
idleTimeout: 1800s
40+
# servicemonitor:
41+
# enabled: true
42+
# path: /abc
43+
# scheme: 'http'
44+
# interval: 30s
45+
# scrapeTimeout: 20s
46+
# metricRelabelings:
47+
# - sourceLabels: [namespace]
48+
# regex: '(.*)'
49+
# replacement: myapp
50+
# targetLabel: target_namespace
51+
resources:
52+
# We usually recommend not to specify default resources and to leave this as a conscious
53+
# choice for the user. This also increases chances charts run on environments with little
54+
# resources, such as Minikube. If you do want to specify resources, uncomment the following
55+
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
56+
limits:
57+
cpu: 1
58+
memory: 200Mi
59+
requests:
60+
cpu: 0.10
61+
memory: 100Mi
62+
63+
# Optional configs
64+
65+
command:
66+
enabled: false
67+
value: []
68+
69+
args:
70+
enabled: false
71+
value:
72+
- /bin/sh
73+
- -c
74+
- touch /tmp/healthy; sleep 30; rm -rf /tmp/healthy; sleep 600
75+
76+
#For adding custom labels to pods
77+
78+
podLabels: {}
79+
# customKey: customValue
80+
podAnnotations: {}
81+
# customKey: customValue
82+
83+
rawYaml: []
84+
85+
initContainers: []
86+
## Additional init containers to run before the Scheduler pods.
87+
## for example, be used to run a sidecar that chown Logs storage.
88+
#- name: volume-mount-hack
89+
# image: busybox
90+
# command: ["sh", "-c", "chown -R 1000:1000 logs"]
91+
# volumeMounts:
92+
# - mountPath: /usr/local/airflow/logs
93+
# name: logs-data
94+
95+
containers: []
96+
## Additional containers to run along with application pods.
97+
## for example, be used to run a sidecar that chown Logs storage .
98+
#- name: volume-mount-hack
99+
# image: busybox
100+
# command: ["sh", "-c", "chown -R 1000:1000 logs"]
101+
# volumeMounts:
102+
# - mountPath: /usr/local/airflow/logs
103+
# name: logs-data
104+
105+
volumeMounts: []
106+
# - name: log-volume
107+
# mountPath: /var/log
108+
109+
volumes: []
110+
# - name: log-volume
111+
# emptyDir: {}
112+
113+
tolerations: []
114+
115+
Spec:
116+
Affinity:
117+
Key:
118+
# Key: kops.k8s.io/instancegroup
119+
Values:
120+
121+
prometheus:
122+
release: monitoring
123+
124+
server:
125+
deployment:
126+
image_tag: 1-95af053
127+
image: ""
128+
129+
servicemonitor:
130+
additionalLabels: {}
131+
132+
imagePullSecrets: []
133+
# - test1
134+
# - test2
135+
136+
containerSecurityContext:
137+
allowPrivilegeEscalation: false
138+
139+
podSecurityContext: {}
140+
# runAsUser: 1000
141+
# runAsGroup: 3000
142+
# fsGroup: 2000
143+
144+
shareProcessNamespace: false
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
MaxSurge: 1
2+
MaxUnavailable: 0
3+
GracePeriod: 30
4+
pauseForSecondsBeforeSwitchActive: 30
5+
waitForSecondsBeforeScalingDown: 30
6+
7+
Spec:
8+
Affinity:
9+
key: ""
10+
Values: nodes
11+
12+
secret:
13+
enabled: false
14+
data: {}
15+
# my_own_secret: S3ViZXJuZXRlcyBXb3Jrcw==
16+
17+
EnvVariables: []
18+
# - name: FLASK_ENV
19+
# value: qa
20+
21+
resources:
22+
# We usually recommend not to specify default resources and to leave this as a conscious
23+
# choice for the user. This also increases chances charts run on environments with little
24+
# resources, such as Minikube. If you do want to specify resources, uncomment the following
25+
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
26+
limits:
27+
cpu: "0.05"
28+
memory: 50Mi
29+
requests:
30+
cpu: "0.01"
31+
memory: 10Mi
32+
33+
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
deployment:
2+
strategy:
3+
blueGreen:
4+
autoPromotionSeconds: 30
5+
scaleDownDelaySeconds: 30
6+
previewReplicaCount: 1
7+
autoPromotionEnabled: false
8+
rolling:
9+
maxSurge: "25%"
10+
maxUnavailable: 1
11+
canary:
12+
maxSurge: "25%"
13+
maxUnavailable: 1
14+
steps:
15+
- setWeight: 25
16+
- pause:
17+
duration: 15 # 1 min
18+
- setWeight: 50
19+
- pause:
20+
duration: 15 # 1 min
21+
- setWeight: 75
22+
- pause:
23+
duration: 15 # 1 min
24+
recreate: {}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
server:
2+
deployment:
3+
image_tag: IMAGE_TAG
4+
image: IMAGE_REPO
5+
enabled: false
6+
dbMigrationConfig:
7+
enabled: false
8+
9+
pauseForSecondsBeforeSwitchActive: 0
10+
waitForSecondsBeforeScalingDown: 0
11+
autoPromotionSeconds: 30
12+
13+
#used for deployment algo selection
14+
orchestrator.deploymant.algo: 1
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"ConfigSecrets":{"enabled":true,"secrets":[{"data":{"standard_key":"c3RhbmRhcmQtdmFsdWU="},"external":false,"externalType":"","mountPath":"/test","name":"normal-secret","type":"volume"},{"data":{"secret_key":"U0VDUkVUIERBVEE="},"external":true,"externalType":"AWSSecretsManager","mountPath":"","name":"external-secret-3","type":"environment"}]}}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
1. Get the application URL by running these commands:
2+
{{- if contains "NodePort" .Values.service.type }}
3+
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include ".Chart.Name .fullname" . }})
4+
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
5+
echo http://$NODE_IP:$NODE_PORT
6+
{{- else if contains "LoadBalancer" .Values.service.type }}
7+
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
8+
You can watch the status of by running 'kubectl get svc -w {{ include ".Chart.Name .fullname" . }}'
9+
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include ".Chart.Name .fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
10+
echo http://$SERVICE_IP:{{ .Values.service.port }}
11+
{{- else if contains "ClusterIP" .Values.service.type }}
12+
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include ".Chart.Name .name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
13+
{{- end }}

0 commit comments

Comments
 (0)