Skip to content

Commit 4bab381

Browse files
committed
adding kub templates
1 parent 5188bb0 commit 4bab381

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

lua/custom/keymaps.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,8 @@ end)
3838

3939
-- In your keybindings configuration (e.g., lua/config/keymaps.lua or init.lua)
4040
vim.keymap.set('n', '<leader>w', '<cmd>NvimTreeToggle<CR>', { desc = 'Toggle NvimTree' })
41+
42+
-- Insert Kubernetes Deployment template below the cursor
43+
vim.keymap.set('n', '<leader>kd', function()
44+
vim.cmd 'read ~/.config/nvim/lua/custom/templates/k8s-deployment.yaml'
45+
end, { desc = 'Insert K8s Deployment template' })
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: <name>
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: <name>
10+
template:
11+
metadata:
12+
labels:
13+
app: <name>
14+
spec:
15+
containers:
16+
- name: <name>
17+
image: nginx:latest
18+
ports:
19+
- containerPort: 80
20+

0 commit comments

Comments
 (0)