forked from songjiz/sublime-kubernetes-snippets
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Kubernetes Deployment.sublime-snippet
80 lines (80 loc) · 1.98 KB
/
Kubernetes Deployment.sublime-snippet
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
<snippet>
<content><![CDATA[
apiVersion: apps/v1
kind: Deployment
metadata:
name: ${1:Enter deployment name}
namespace: ${2:default}
labels:
name: $1
spec:
replicas: ${3:Enter the number of replicas}
strategy:
type: Recreate
selector:
matchLabels:
{{- include "jenkins.labels" . | nindent 6 }}
template:
metadata:
labels:
name: $1
spec:
containers:
- name: $1
image: ${4:Enter containers image}
imagePullPolicy: ${5:Always} # Always|Never|IfNotPresent
# command: string
# workingDir: string
# volumeMounts:
# - name: string
# mountPath: string
# readOnly: boolean
# ports:
# - name: string
# containerPort: Int
# hostPort: Int
# protocol: string # TCP|UDP
# livenessProbe:
# httpGet:
# path: /healthz
# port: 8080
# initialDelaySeconds: 3
# periodSeconds: 3
# env:
# - name: string
# value: string
# resources:
# requests:
# limits:
# cpu: string
# memory: string
# volumes:
# - name: string
# emptyDir: {}
# hostPath:
# path: string
#initContainers:
# - name: string
# image: string
# imagePullPolicy: string # Always|Never|IfNotPresent
# resources:
# requests:
# limits:
# cpu: string
# memory: string
#nodeSelector:
# string: string
#tolerations:
#- effect: string # NoSchedule|PreferNoSchedule|NoExecute
# key: string
# operator: Equal # Exists|Equal
# value: string
#securityContext:
# fsGroup: string
# runAsUser: string
# fsGroupChangePolicy: string # OnRootMismatch|Always
]]></content>
<tabTrigger>k8s:deploy</tabTrigger>
<scope>source.yaml</scope>
<description>Kubernetes Deployment</description>
</snippet>