Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ name: #@ fullname(vars)
labels: #@ labels(vars)
#@ end

---

#@ def labels(vars):
chart: #@ "{}-{}".format(vars.Chart.Name, vars.Chart.Version).replace("+", "_")
heritage: #@ vars.Release.Service
_: #@ template.replace(selector(vars))
#@ end

---

#@ def selector(vars):
app: #@ name(vars)
release: #@ vars.Release.Name
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@
#@ def/end app_labels(app):
app: #@ app.name

---

#@ def app_svc_name(app):
#@ return app.name + "-svc"
#@ end

---

#@ def app_config(app):
---
kind: Pod
Expand Down
2 changes: 2 additions & 0 deletions examples/playground/basics/example-load/funcs.lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ cities:
- LA
#@ end

---

#@ def func2():
name: joanna
cities:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
#@ return str(n)+"m"
#@ end

---

#@ def memorys(n):
#@ return "{}Mi".format(n)
#@ end

---

#! request_50m_per_factor — generates a resources request
#! given a scaling factor such that the limits are twice
#! the initial request.
Expand All @@ -29,4 +33,4 @@ limits:
#@ if not for_selecting:
app.kubernetes.io/version: #@ version
#@ end
#@ end
#@ end
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
#@ return str(n)+"m"
#@ end

---

#@ def memorys(n):
#@ return "{}Mi".format(n)
#@ end

---

#! request_50m_per_factor — generates a resources request
#! given a scaling factor such that the limits are twice
#! the initial request.
Expand All @@ -29,4 +33,4 @@ limits:
#@ if not for_selecting:
app.kubernetes.io/version: #@ version
#@ end
#@ end
#@ end
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
#@ return str(n)+"m"
#@ end

---

#@ def memorys(n):
#@ return "{}Mi".format(n)
#@ end

---

#! request_50m_per_factor — generates a resources request
#! given a scaling factor such that the limits are twice
#! the initial request.
Expand All @@ -29,4 +33,4 @@ limits:
#@ if not for_selecting:
app.kubernetes.io/version: #@ version
#@ end
#@ end
#@ end
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
#@ return str(n)+"m"
#@ end

---

#@ def memorys(n):
#@ return "{}Mi".format(n)
#@ end

---

#! request_50m_per_factor — generates a resources request
#! given a scaling factor such that the limits are twice
#! the initial request.
Expand All @@ -29,4 +33,4 @@ limits:
#@ if not for_selecting:
app.kubernetes.io/version: #@ version
#@ end
#@ end
#@ end
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
#@ return str(n)+"m"
#@ end

---

#@ def memorys(n):
#@ return "{}Mi".format(n)
#@ end

---

#! request_50m_per_factor — generates a resources request
#! given a scaling factor such that the limits are twice
#! the initial request.
Expand All @@ -29,4 +33,4 @@ limits:
#@ if not for_selecting:
app.kubernetes.io/version: #@ version
#@ end
#@ end
#@ end
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,14 @@
#@ return str(n)+"m"
#@ end

---

#@ def memorys(n):
#@ return "{}Mi".format(n)
#@ end

---

#! request_50m_per_factor — generates a resources request
#! given a scaling factor such that the limits are twice
#! the initial request.
Expand All @@ -29,4 +33,4 @@ limits:
#@ if not for_selecting:
app.kubernetes.io/version: #@ version
#@ end
#@ end
#@ end
Loading