mirror of
https://github.com/amix/vimrc
synced 2025-06-16 09:35:01 +08:00
Forgot to add the newly created files from the plugin update
This commit is contained in:
591
sources_non_forked/vim-snippets/snippets/helm.snippets
Normal file
591
sources_non_forked/vim-snippets/snippets/helm.snippets
Normal file
@ -0,0 +1,591 @@
|
||||
snippet service_sample_spec
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
{{- if .Values.$1.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.$1.service.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- if .Values.$1.service.labels }}
|
||||
{{ toYaml .Values.$1.service.labels | indent 4 }}
|
||||
{{- end }}
|
||||
app: {{ template "$2.name" . }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
component: "{{ .Values.$1.name }}"
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
name: {{ template "$2.$1.fullname" . }}
|
||||
spec:
|
||||
clusterIP: "{{ .Values.$1.service.clusterIP }}"
|
||||
{{- if .Values.$1.service.externalIPs }}
|
||||
externalIPs:
|
||||
{{ toYaml .Values.$1.service.externalIPs | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.$1.service.loadBalancerIP }}
|
||||
loadBalancerIP: "{{ .Values.$1.service.loadBalancerIP }}"
|
||||
{{- end }}
|
||||
{{- if .Values.$1.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{ toYaml .Values.$1.service.loadBalancerSourceRanges | indent 4 }}
|
||||
{{- end }}
|
||||
healthCheckNodePort: {{ .Values.$1.service.healthCheckNodePort }}
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: {{ .Values.$1.service.targetPorts.http }}
|
||||
{{- if (and (eq .Values.$1.service.type "NodePort") (not (empty .Values.$1.service.nodePorts.http))) }}
|
||||
nodePort: {{ .Values.$1.service.nodePorts.http }}
|
||||
{{- end }}
|
||||
- name: https
|
||||
port: 443
|
||||
protocol: TCP
|
||||
targetPort: {{ .Values.$1.service.targetPorts.https }}
|
||||
{{- if (and (eq .Values.$1.service.type "NodePort") (not (empty .Values.$1.service.nodePorts.https))) }}
|
||||
nodePort: {{ .Values.$1.service.nodePorts.https }}
|
||||
{{- end }}
|
||||
{{- range $key, $value := .Values.tcp }}
|
||||
- name: "{{ $key }}-tcp"
|
||||
port: {{ $key }}
|
||||
protocol: TCP
|
||||
targetPort: "{{ $key }}-tcp"
|
||||
{{- end }}
|
||||
{{- range $key, $value := .Values.udp }}
|
||||
- name: "{{ $key }}-udp"
|
||||
port: {{ $key }}
|
||||
protocol: UDP
|
||||
targetPort: "{{ $key }}-udp"
|
||||
{{- end }}
|
||||
selector:
|
||||
app: {{ template "${2:chartName}.name" . }}
|
||||
component: "{{ .Values.$1.name }}"
|
||||
release: {{ .Release.Name }}
|
||||
type: "{{ .Values.${1:value_key}.service.type }}"
|
||||
|
||||
snippet service_spec
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
{{- if .Values.$1.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.$1.service.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- if .Values.$1.service.labels }}
|
||||
{{ toYaml .Values.$1.service.labels | indent 4 }}
|
||||
{{- end }}
|
||||
app: {{ template "$2.name" . }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
component: "{{ .Values.$1.name }}"
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
name: {{ template "${2:chartName}.${1:value_key}.fullname" . }}
|
||||
# spec
|
||||
${0}
|
||||
|
||||
snippet annotations_spec
|
||||
{{- if .Values.$1.service.annotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.${1:value_key}.service.annotations | indent 4 }}
|
||||
{{- end }}
|
||||
${0}
|
||||
|
||||
snippet labels_spec
|
||||
labels:
|
||||
{{- if .Values.$1.service.labels }}
|
||||
{{ toYaml .Values.$1.service.labels | indent 4 }}
|
||||
{{- end }}
|
||||
app: {{ template "$2.name" . }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
component: "{{ .Values.$1.name }}"
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
name: {{ template "${2:chartName}.${1:value_key}.fullname" . }}
|
||||
${0}
|
||||
|
||||
snippet service_spec
|
||||
spec:
|
||||
type: "{{ .Values.$1.service.type }}"
|
||||
clusterIP: "{{ .Values.$1.service.clusterIP }}"
|
||||
{{- if .Values.$1.service.externalIPs }}
|
||||
externalIPs:
|
||||
{{ toYaml .Values.$1.service.externalIPs | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if .Values.$1.service.loadBalancerIP }}
|
||||
loadBalancerIP: "{{ .Values.$1.service.loadBalancerIP }}"
|
||||
{{- end }}
|
||||
{{- if .Values.$1.service.loadBalancerSourceRanges }}
|
||||
loadBalancerSourceRanges:
|
||||
{{ toYaml .Values.$1.service.loadBalancerSourceRanges | indent 4 }}
|
||||
{{- end }}
|
||||
{{- if and (semverCompare ">=1.7-0" .Capabilities.KubeVersion.GitVersion) (.Values.$1.service.externalTrafficPolicy) }}
|
||||
externalTrafficPolicy: "{{ .Values.$1.service.externalTrafficPolicy }}"
|
||||
{{- end }}
|
||||
{{- if and (semverCompare ">=1.7-0" .Capabilities.KubeVersion.GitVersion) (.Values.$1.service.healthCheckNodePort) }}
|
||||
healthCheckNodePort: {{ .Values.${1:value_key}.service.healthCheckNodePort }}
|
||||
{{- end }}
|
||||
${0}
|
||||
|
||||
snippet ports_spec
|
||||
ports:
|
||||
${0}
|
||||
|
||||
snippet portHTTP_spec
|
||||
- name: http
|
||||
port: 80
|
||||
protocol: TCP
|
||||
targetPort: {{ .Values.$1.service.targetPorts.http }}
|
||||
{{- if (and (eq .Values.$1.service.type "NodePort") (not (empty .Values.$1.service.nodePorts.http))) }}
|
||||
nodePort: {{ .Values.${1:value_key}.service.nodePorts.http }}
|
||||
{{- end }}
|
||||
${0}
|
||||
|
||||
snippet portHTTPS_spec
|
||||
- name: https
|
||||
port: 443
|
||||
protocol: TCP
|
||||
targetPort: {{ .Values.$1.service.targetPorts.https }}
|
||||
{{- if (and (eq .Values.$1.service.type "NodePort") (not (empty .Values.$1.service.nodePorts.https))) }}
|
||||
nodePort: {{ .Values.${1:value_key}.service.nodePorts.https }}
|
||||
{{- end }}
|
||||
${0}
|
||||
|
||||
snippet portTCP_spec
|
||||
{{- range $key, $value := .Values.tcp }}
|
||||
- name: "{{ $key }}-tcp"
|
||||
port: {{ $key }}
|
||||
protocol: TCP
|
||||
targetPort: "{{ $key }}-tcp"
|
||||
{{- end }}
|
||||
${0}
|
||||
|
||||
snippet portUDP_spec
|
||||
{{- range $key, $value := .Values.udp }}
|
||||
- name: "{{ $key }}-udp"
|
||||
port: {{ $key }}
|
||||
protocol: UDP
|
||||
targetPort: "{{ $key }}-udp"
|
||||
{{- end }}
|
||||
${0}
|
||||
|
||||
|
||||
snippet selector_spec
|
||||
selector:
|
||||
app: {{ template "${2:chartName}.name" . }}
|
||||
component: "{{ .Values.${1:value_key}.name }}"
|
||||
release: {{ .Release.Name }}
|
||||
${0}
|
||||
|
||||
|
||||
snippet deploy_sample_spec
|
||||
{{- if .Values.$1.enabled }}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "$2.name" . }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
component: "{{ .Values.$1.name }}"
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
name: {{ template "$2.$1.fullname" . }}
|
||||
spec:
|
||||
replicas: {{ .Values.$1.replicaCount }}
|
||||
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
|
||||
template:
|
||||
metadata:
|
||||
{{- if .Values.$1.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.$1.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app: {{ template "$2.name" . }}
|
||||
component: "{{ .Values.$1.name }}"
|
||||
release: {{ .Release.Name }}
|
||||
{{- if .Values.$1.podLabels }}
|
||||
{{ toYaml .Values.$1.podLabels | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{ toYaml .Values.imagePullSecrets | indent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: {{ template "${2:chartName}.name" . }}-{{ .Values.$1.name }}
|
||||
image: "{{ .Values.$1.image.repository }}:{{ .Values.$1.image.tag }}"
|
||||
imagePullPolicy: "{{ .Values.$1.image.pullPolicy }}"
|
||||
args:
|
||||
{{- range $key, $value := .Values.$1.extraArgs }}
|
||||
{{- if $value }}
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- else }}
|
||||
- --{{ $key }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 5
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
resources:
|
||||
{{ toYaml .Values.$1.resources | indent 12 }}
|
||||
{{- if .Values.$1.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.$1.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.$1.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml .Values.$1.tolerations | indent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.$1.affinity }}
|
||||
affinity:
|
||||
{{ toYaml .Values.${1:value_key}.affinity | indent 8 }}
|
||||
{{- end }}
|
||||
terminationGracePeriodSeconds: 60
|
||||
{{- end }}
|
||||
|
||||
|
||||
|
||||
snippet deploy_spec
|
||||
{{- if .Values.$1.enabled }}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
labels:
|
||||
app: {{ template "$2.name" . }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
component: "{{ .Values.$1.name }}"
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
name: {{ template "${2:chartName}.${1:value_key}.fullname" . }}
|
||||
# spec
|
||||
# containers_spec
|
||||
# livenessProbe_spec
|
||||
# PersistentVolumeClaim_spec
|
||||
# initContainers_spec
|
||||
# resources_spec
|
||||
# nodeselector_spec
|
||||
# tolerations_spec
|
||||
# affinity_spec
|
||||
${0}
|
||||
|
||||
snippet spec_spec
|
||||
spec:
|
||||
replicas: {{ .Values.$1.replicaCount }}
|
||||
revisionHistoryLimit: {{ .Values.revisionHistoryLimit }}
|
||||
template:
|
||||
metadata:
|
||||
{{- if .Values.$1.podAnnotations }}
|
||||
annotations:
|
||||
{{ toYaml .Values.$1.podAnnotations | indent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
app: {{ template "${2:chartName}.name" . }}
|
||||
component: "{{ .Values.$1.name }}"
|
||||
release: {{ .Release.Name }}
|
||||
{{- if .Values.$1.podLabels }}
|
||||
{{ toYaml .Values.${1:value_key}.podLabels | indent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{ toYaml .Values.imagePullSecrets | indent 8 }}
|
||||
{{- end }}
|
||||
${0}
|
||||
|
||||
snippet imagePullSecrets_spec
|
||||
{{- if .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{ toYaml .Values.imagePullSecrets | indent 8 }}
|
||||
{{- end }}
|
||||
${0}
|
||||
|
||||
snippet imagePullPolicy_spec
|
||||
imagePullPolicy: ${1:imagePullPolicy}
|
||||
${0}
|
||||
|
||||
snippet containers_spec
|
||||
containers:
|
||||
- name: {{ template "${2:chartName}.name" . }}-{{ .Values.$1.name }}
|
||||
image: "{{ .Values.$1.image.repository }}:{{ .Values.$1.image.tag }}"
|
||||
imagePullPolicy: "{{ .Values.${1:value_key}.image.pullPolicy }}"
|
||||
${0}
|
||||
snippet args_spec
|
||||
args:
|
||||
{{- range $key, $value := .Values.${1:value_key}.extraArgs }}
|
||||
{{- if $value }}
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- else }}
|
||||
- --{{ $key }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
${0}
|
||||
snippet livenessProbe_spec
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 8080
|
||||
scheme: HTTP
|
||||
initialDelaySeconds: 30
|
||||
timeoutSeconds: 5
|
||||
${0}
|
||||
snippet readinessProbe_spec
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /go/api/v1/health
|
||||
port: 8153
|
||||
initialDelaySeconds: {{ .Values.$1.healthCheck.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.$1.healthCheck.periodSeconds }}
|
||||
failureThreshold: {{ .Values.$1.healthCheck.failureThreshold }}
|
||||
${0}
|
||||
snippet resources_spec
|
||||
resources:
|
||||
{{ toYaml .Values.${1:value_key}.resources | indent 12 }}
|
||||
${0}
|
||||
snippet nodeselector_spec
|
||||
{{- if .Values.$1.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{ toYaml .Values.${1:value_key}.nodeSelector | indent 8 }}
|
||||
{{- end }}
|
||||
${0}
|
||||
snippet tolerations_spec
|
||||
{{- if .Values.$1.tolerations }}
|
||||
tolerations:
|
||||
{{ toYaml .Values.${1:value_key}.tolerations | indent 8 }}
|
||||
{{- end }}
|
||||
${0}
|
||||
snippet affinity_spec
|
||||
{{- if .Values.$1.affinity }}
|
||||
affinity:
|
||||
{{ toYaml .Values.${1:value_key}.affinity | indent 8 }}
|
||||
{{- end }}
|
||||
terminationGracePeriodSeconds: 60
|
||||
{{- end }}
|
||||
${0}
|
||||
|
||||
snippet PersistentVolumeClaim_spec
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "${2}.$1.fullname" . }}
|
||||
labels:
|
||||
app: {{ template "${2:chartName}.name" . }}
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.$1.persistence.accessMode | quote }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.$1.persistence.size | quote }}
|
||||
{{- if .Values.$1.persistence.storageClass }}
|
||||
{{- if (eq "-" .Values.$1.persistence.storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ .Values.${1:value_key}.persistence.storageClass }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
${0}
|
||||
|
||||
snippet configMap_spec
|
||||
{{- if .Values.artifactory.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ template "${2:chartName}.fullname" . }}-${1:value_key}-config
|
||||
labels:
|
||||
app: {{ template "${2}.name" . }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
data:
|
||||
${3:nameOfConfigFile}.conf: |
|
||||
# data goes here
|
||||
{{- end -}}
|
||||
${0}
|
||||
|
||||
snippet initContainers_spec
|
||||
{{- if .Values.$1.initContainers }}
|
||||
initContainers:
|
||||
- name: wait-workers
|
||||
image: "{{ .Values.$1.image.repository }}:{{ .Values.$1.image.tag }}"
|
||||
imagePullPolicy: {{ .Values.${1:value_key}.image.pullPolicy }}
|
||||
# env
|
||||
command:
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
until printf "." && nc -z -w 2 {{ template "${2:chartName}.fullname" . }} {{ .Values.postgresql.service.port }}; do
|
||||
sleep 2;
|
||||
done;
|
||||
|
||||
echo 'PostgreSQL OK ✓'
|
||||
# args
|
||||
{{- end }}
|
||||
${0}
|
||||
|
||||
snippet pvc_spec
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ template "$2.fullname" . }}
|
||||
labels:
|
||||
chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
|
||||
release: "{{ .Release.Name }}"
|
||||
heritage: "{{ .Release.Service }}"
|
||||
app: {{ template "${2:chartName}.fullname" . }}
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.persistence.accessMode | quote }}
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.persistence.size | quote }}
|
||||
{{- if .Values.persistence.storageClass }}
|
||||
{{- if (eq "-" .Values.persistence.storageClass) }}
|
||||
storageClassName: ""
|
||||
{{- else }}
|
||||
storageClassName: "{{ .Values.persistence.storageClass }}"
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
${0}
|
||||
|
||||
snippet pv_nfs_spec
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: {{ template "$2.fullname" . }}-data-pv
|
||||
labels:
|
||||
app: {{ template "$2.name" . }}
|
||||
chart: {{ .Chart.Name }}-{{ .Chart.Version }}
|
||||
heritage: {{ .Release.Service }}
|
||||
release: {{ .Release.Name }}
|
||||
id: {{ template "${2:chartName}.name" . }}-data-pv
|
||||
type: nfs-volume
|
||||
spec:
|
||||
capacity:
|
||||
storage: {{ .Values.$1.persistence.nfs.capacity }}
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
persistentVolumeReclaimPolicy: Retain
|
||||
nfs:
|
||||
server: {{ .Values.$1.persistence.nfs.ip }}
|
||||
path: "{{ .Values.${1:value_key}.persistence.nfs.haDataMount }}"
|
||||
readOnly: false
|
||||
${0}
|
||||
|
||||
snippet pvc_hostpath_spec
|
||||
{{- if and .Values.persistence.enabled .Values.persistence.$1.hostPath (not
|
||||
.Values.persistence.$1.existingClaim) -}}
|
||||
apiVersion: v1
|
||||
kind: PersistentVolume
|
||||
metadata:
|
||||
name: {{ template "${2:chartName}.fullname" . }}-$1
|
||||
spec:
|
||||
accessModes:
|
||||
- {{ .Values.persistence.$1.accessMode | quote }}
|
||||
capacity:
|
||||
storage: {{ .Values.persistence.$1.size | quote }}
|
||||
hostPath:
|
||||
path: {{ .Values.persistence.${1:value_key}.hostPath | quote }}
|
||||
{{- end -}}
|
||||
${0}
|
||||
|
||||
snippet deploy_values
|
||||
$1:
|
||||
name: ${1:value_key}
|
||||
image:
|
||||
repository:
|
||||
tag:
|
||||
pullPolicy: IfNotPresent
|
||||
hostNetwork: false
|
||||
dnsPolicy: ClusterFirst
|
||||
daemonset:
|
||||
useHostPort: false
|
||||
podLabels: {}
|
||||
scope:
|
||||
enabled: false
|
||||
namespace: "" # defaults to .Release.Namespace
|
||||
extraArgs: {}
|
||||
extraEnvs: []
|
||||
kind: Deployment
|
||||
updateStrategy: {}
|
||||
minReadySeconds: 0
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
nodeSelector: {}
|
||||
podAnnotations: {}
|
||||
replicaCount: 1
|
||||
minAvailable: 1
|
||||
resources: {}
|
||||
autoscaling:
|
||||
enabled: false
|
||||
extraContainers: {}
|
||||
extraVolumeMounts: {}
|
||||
extraVolumes: {}
|
||||
extraInitContainers: []
|
||||
lifecycle: {}
|
||||
revisionHistoryLimit: 10
|
||||
${0}
|
||||
|
||||
snippet rbac_values
|
||||
${1:value_key}:
|
||||
rbac:
|
||||
create: true
|
||||
serviceAccount:
|
||||
create: true
|
||||
name:
|
||||
imagePullSecrets: []
|
||||
${0}
|
||||
|
||||
snippet service_values
|
||||
${1:value_key}:
|
||||
service:
|
||||
annotations: {}
|
||||
labels: {}
|
||||
clusterIP: ""
|
||||
externalIPs: []
|
||||
loadBalancerIP: ""
|
||||
loadBalancerSourceRanges: []
|
||||
externalTrafficPolicy: ""
|
||||
healthCheckNodePort: 0
|
||||
targetPorts:
|
||||
http: http
|
||||
https: https
|
||||
type: LoadBalancer
|
||||
nodePorts:
|
||||
http: ""
|
||||
https: ""
|
||||
${0}
|
||||
|
||||
snippet readinessProbe_values
|
||||
${1:value_key}:
|
||||
readinessProbe:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
port: 10254
|
||||
${0}
|
||||
|
||||
snippet livenessProbe_values
|
||||
${1:value_key}:
|
||||
livenessProbe:
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 1
|
||||
port: 10254
|
||||
${0}
|
270
sources_non_forked/vim-snippets/snippets/jenkins.snippets
Normal file
270
sources_non_forked/vim-snippets/snippets/jenkins.snippets
Normal file
@ -0,0 +1,270 @@
|
||||
snippet steps
|
||||
steps {
|
||||
sh '${1:make check}'
|
||||
junit '${2:reports/**/*.xml}'
|
||||
}
|
||||
${0}
|
||||
|
||||
snippet stage
|
||||
stage('${1:Test}'){
|
||||
steps {
|
||||
sh '${2:make check}'
|
||||
junit '${3:reports/**/*.xml}'
|
||||
}
|
||||
}
|
||||
${0}
|
||||
|
||||
snippet pipeline
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('${1:Build}') {
|
||||
steps {
|
||||
sh '${2:make}'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
${0}
|
||||
|
||||
snippet pipeline_sample
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('${1:Build}') {
|
||||
steps {
|
||||
sh '${2:make}'
|
||||
}
|
||||
}
|
||||
stage('${3:Test}'){
|
||||
steps {
|
||||
sh '${4:make check}'
|
||||
junit '${5:reports/**/*.xml}'
|
||||
}
|
||||
}
|
||||
stage('${6:Deploy}') {
|
||||
steps {
|
||||
sh '${7:make publish}'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
${0}
|
||||
|
||||
snippet d
|
||||
docker {
|
||||
image '${1:myregistry.com/node'}'
|
||||
label '${2:my-defined-label'}'
|
||||
registryUrl '${3:https://myregistry.com/'}'
|
||||
registryCredentialsId '${4:myPredefinedCredentialsInJenkins'}'
|
||||
}
|
||||
|
||||
|
||||
snippet df
|
||||
dockerfile {
|
||||
filename '${1:Dockerfile.build}'
|
||||
dir '${2:build}'
|
||||
label '${3:my-defined-label}'
|
||||
registryUrl '${4:https://myregistry.com/}'
|
||||
registryCredentialsId '${5:myPredefinedCredentialsInJenkins}'
|
||||
}
|
||||
|
||||
snippet pa
|
||||
post {
|
||||
always {
|
||||
${1}
|
||||
}
|
||||
}
|
||||
${0}
|
||||
|
||||
snippet pc
|
||||
post {
|
||||
changed {
|
||||
${1}
|
||||
}
|
||||
}
|
||||
${0}
|
||||
|
||||
snippet pf
|
||||
post {
|
||||
fixed {
|
||||
${1}
|
||||
}
|
||||
}
|
||||
${0}
|
||||
|
||||
snippet pr
|
||||
post {
|
||||
regression {
|
||||
${1}
|
||||
}
|
||||
}
|
||||
${0}
|
||||
|
||||
snippet pab
|
||||
post {
|
||||
aborted {
|
||||
${1}
|
||||
}
|
||||
}
|
||||
${0}
|
||||
|
||||
snippet pfa
|
||||
post {
|
||||
failure {
|
||||
${1}
|
||||
}
|
||||
}
|
||||
${0}
|
||||
|
||||
snippet ps
|
||||
post {
|
||||
success {
|
||||
${1}
|
||||
}
|
||||
}
|
||||
${0}
|
||||
|
||||
snippet pu
|
||||
post {
|
||||
unstable {
|
||||
${1}
|
||||
}
|
||||
}
|
||||
${0}
|
||||
|
||||
snippet pc
|
||||
post {
|
||||
cleanup {
|
||||
${1}
|
||||
}
|
||||
}
|
||||
${0}
|
||||
|
||||
|
||||
snippet psss
|
||||
pipeline {
|
||||
agent any
|
||||
stages {
|
||||
stage('${1:Build}') {
|
||||
steps {
|
||||
sh '${2:make}'
|
||||
}
|
||||
}
|
||||
}
|
||||
${0}
|
||||
|
||||
snippet sss
|
||||
stages {
|
||||
stage('${1:Build}') {
|
||||
steps {
|
||||
sh '${2:make}'
|
||||
}
|
||||
}
|
||||
}
|
||||
${0}
|
||||
|
||||
|
||||
|
||||
snippet parameters
|
||||
parameters{
|
||||
${1}
|
||||
}
|
||||
${0}
|
||||
|
||||
snippet paramtext
|
||||
text(name: "${1:BIOGRAPHY}" , defaultValue: "${2:default}" , description: "${3:Enter some information about the person}")
|
||||
${0}
|
||||
|
||||
snippet parambool
|
||||
booleanParam(name: "${1:TOGGLE}" , defaultValue: ${2:default}, description: "${3:Toggle this value}")
|
||||
${0}
|
||||
|
||||
snippet paramchoice
|
||||
choice(name: "${1:CHOICE}" , choices: ["${2:Choices}",] , description: "${3:Pick something}")
|
||||
${0}
|
||||
|
||||
snippet parampassword
|
||||
password(name: "${1:PASSWORD}" , defaultValue: "${2:SECRET}" , description: "${3:Enter a password}")
|
||||
${0}
|
||||
|
||||
snippet paramfile
|
||||
file(name: "${1:FILE}" , description: "${2:Choose a file to upload}")${0}
|
||||
${0}
|
||||
|
||||
snippet triggers
|
||||
triggers {
|
||||
cron('${1:H */4 * * 1-5}')
|
||||
}
|
||||
${0}
|
||||
|
||||
snippet input
|
||||
input {
|
||||
message '${1:Should we continue?}'
|
||||
ok '${2:Yes, we should.}'
|
||||
submitter '${3:alice,bob}'
|
||||
parameters {
|
||||
string(name: '${4:PERSON}' , defaultValue: '${5:Mr Jenkins}' , description: '${6:Who should I say hello to?}')
|
||||
}
|
||||
}
|
||||
${0}
|
||||
|
||||
snippet whenbranch
|
||||
when {
|
||||
branch '${1:branch}'
|
||||
}
|
||||
${0}
|
||||
snippet whenbuildingTag
|
||||
when {
|
||||
buildingTag '${1:tag}'
|
||||
}
|
||||
${0}
|
||||
snippet whenchangelog
|
||||
when {
|
||||
changelog '${1:changelog}'
|
||||
}
|
||||
${0}
|
||||
snippet whenchangeset
|
||||
when {
|
||||
changeset '${1:changeSet}'
|
||||
}
|
||||
${0}
|
||||
snippet whenchangeRequest
|
||||
when {
|
||||
changeRequest '${1:changeRequest}'
|
||||
}
|
||||
${0}
|
||||
snippet whenenvironment
|
||||
when {
|
||||
environment '${1:environment}'
|
||||
}
|
||||
${0}
|
||||
snippet whenequals
|
||||
when {
|
||||
equals '${1:equals}'
|
||||
}
|
||||
${0}
|
||||
snippet whenexpression
|
||||
when {
|
||||
expression '${1:expression}'
|
||||
}
|
||||
${0}
|
||||
snippet whentag
|
||||
when {
|
||||
tag '${1:tag}'
|
||||
}
|
||||
${0}
|
||||
snippet whennot
|
||||
when {
|
||||
not '${1:not}'
|
||||
}
|
||||
${0}
|
||||
snippet whenallOf
|
||||
when {
|
||||
allOf '${1:allOf}'
|
||||
}
|
||||
${0}
|
||||
snippet whenanyOf
|
||||
when {
|
||||
anyOf '${1:anyOf}'
|
||||
}
|
Reference in New Issue
Block a user