migrate
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
apiVersion: apps/v1
|
||||
kind: DaemonSet
|
||||
metadata:
|
||||
name: << resource_name >>
|
||||
namespace: << namespace >>
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: << app_label >>
|
||||
updateStrategy:
|
||||
type: << update_strategy >>
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: << app_label >>
|
||||
spec:
|
||||
<%- if host_network_enabled %>
|
||||
hostNetwork: true
|
||||
dnsPolicy: ClusterFirstWithHostNet
|
||||
<%- endif %>
|
||||
<%- if service_account_name %>
|
||||
serviceAccountName: << service_account_name >>
|
||||
<%- endif %>
|
||||
<%- if control_plane_toleration_enabled %>
|
||||
tolerations:
|
||||
- key: node-role.kubernetes.io/control-plane
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
- key: node-role.kubernetes.io/master
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
<%- endif %>
|
||||
containers:
|
||||
- name: << container_name >>
|
||||
image: << image >>
|
||||
imagePullPolicy: << image_pull_policy >>
|
||||
<%- if ports_enabled %>
|
||||
ports:
|
||||
- containerPort: << container_port >>
|
||||
protocol: << container_port_protocol >>
|
||||
<%- if container_port_name %>
|
||||
name: << container_port_name >>
|
||||
<%- endif %>
|
||||
<%- endif %>
|
||||
<%- if env_literal_enabled or env_fieldref_enabled %>
|
||||
env:
|
||||
<%- if env_literal_enabled %>
|
||||
- name: << env_literal_name >>
|
||||
value: "<< env_literal_value >>"
|
||||
<%- endif %>
|
||||
<%- if env_fieldref_enabled %>
|
||||
- name: << env_fieldref_name >>
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: << env_fieldref_field_path >>
|
||||
<%- endif %>
|
||||
<%- endif %>
|
||||
<%- if host_path_enabled %>
|
||||
volumeMounts:
|
||||
- name: host-path
|
||||
mountPath: << mount_path >>
|
||||
readOnly: << host_path_read_only | lower >>
|
||||
<%- endif %>
|
||||
<%- if resources_enabled %>
|
||||
resources:
|
||||
limits:
|
||||
cpu: << resources_cpu_limit >>
|
||||
memory: << resources_memory_limit >>
|
||||
requests:
|
||||
cpu: << resources_cpu_request >>
|
||||
memory: << resources_memory_request >>
|
||||
<%- endif %>
|
||||
<%- if host_path_enabled %>
|
||||
volumes:
|
||||
- name: host-path
|
||||
hostPath:
|
||||
path: << host_path >>
|
||||
type: DirectoryOrCreate
|
||||
<%- endif %>
|
||||
Reference in New Issue
Block a user