mirror of
https://github.com/foomo/squadron.git
synced 2026-10-04 06:36:54 +00:00
feat: add vars and extend template funcs
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ squadron:
|
||||
- baz=baz
|
||||
file: Dockerfile
|
||||
tag: nightly
|
||||
image: docker.mycompany.com/mycomapny/frontend
|
||||
image: storefinder/frontend
|
||||
values:
|
||||
image:
|
||||
repository: <% .Squadron.storefinder.frontend.builds.default.image %>
|
||||
|
||||
+2
-2
@@ -15,8 +15,8 @@ squadron:
|
||||
- baz=baz
|
||||
file: Dockerfile
|
||||
tag: nightly
|
||||
image: docker.mycompany.com/mycomapny/frontend
|
||||
image: storefinder/frontend
|
||||
values:
|
||||
image:
|
||||
repository: docker.mycompany.com/mycomapny/frontend
|
||||
repository: storefinder/frontend
|
||||
tag: nightly
|
||||
|
||||
+1
-1
@@ -43,7 +43,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: storefinder-frontend
|
||||
image: 'docker.mycompany.com/mycomapny/frontend:nightly'
|
||||
image: 'storefinder/frontend:nightly'
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
|
||||
Vendored
+2
-2
@@ -8,7 +8,7 @@ squadron:
|
||||
default:
|
||||
tag: latest
|
||||
file: Dockerfile
|
||||
image: docker.mycompany.com/mycomapny/frontend
|
||||
image: storefinder/frontend
|
||||
build_arg:
|
||||
- "foo=foo"
|
||||
- "bar=bar"
|
||||
@@ -22,7 +22,7 @@ squadron:
|
||||
default:
|
||||
tag: latest
|
||||
file: Dockerfile
|
||||
image: docker.mycompany.com/mycomapny/backend
|
||||
image: storefinder/backend
|
||||
build_arg:
|
||||
- "foo=foo"
|
||||
- "bar=bar"
|
||||
|
||||
+4
-3
@@ -1,5 +1,6 @@
|
||||
version: "2.0"
|
||||
global:
|
||||
enabled: true
|
||||
host: mycompany.com
|
||||
squadron:
|
||||
storefinder:
|
||||
@@ -11,7 +12,7 @@ squadron:
|
||||
builds:
|
||||
default:
|
||||
tag: latest
|
||||
image: docker.mycompany.com/mycomapny/frontend-admin
|
||||
image: storefinder/backend
|
||||
values:
|
||||
image:
|
||||
repository: <% .Squadron.storefinder.backend.builds.default.image %>
|
||||
@@ -24,10 +25,10 @@ squadron:
|
||||
builds:
|
||||
default:
|
||||
tag: latest
|
||||
image: docker.mycompany.com/mycomapny/frontend
|
||||
image: storefinder/frontend
|
||||
values:
|
||||
env:
|
||||
BASE64: <% base64 "1234567890" %>
|
||||
BASE64: <% "1234567890" | b64enc %>
|
||||
DEFAULT_INDEX_VALUE: <% defaultIndex .Global "notexists" "fallback" %>
|
||||
DEFAULT_VALUE: <% "" | default "fallback" %>
|
||||
ENV: <% env "SHELL" %>
|
||||
|
||||
+5
-4
@@ -1,5 +1,6 @@
|
||||
version: "2.0"
|
||||
global:
|
||||
enabled: true
|
||||
host: mycompany.com
|
||||
squadron:
|
||||
storefinder:
|
||||
@@ -11,10 +12,10 @@ squadron:
|
||||
builds:
|
||||
default:
|
||||
tag: latest
|
||||
image: docker.mycompany.com/mycomapny/frontend-admin
|
||||
image: storefinder/backend
|
||||
values:
|
||||
image:
|
||||
repository: docker.mycompany.com/mycomapny/frontend-admin
|
||||
repository: storefinder/backend
|
||||
tag: latest
|
||||
frontend:
|
||||
chart:
|
||||
@@ -24,7 +25,7 @@ squadron:
|
||||
builds:
|
||||
default:
|
||||
tag: latest
|
||||
image: docker.mycompany.com/mycomapny/frontend
|
||||
image: storefinder/frontend
|
||||
values:
|
||||
env:
|
||||
BASE64: MTIzNDU2Nzg5MA==
|
||||
@@ -33,7 +34,7 @@ squadron:
|
||||
ENV: /bin/zsh
|
||||
GLOBAL: mycompany.com
|
||||
image:
|
||||
repository: docker.mycompany.com/mycomapny/frontend
|
||||
repository: storefinder/frontend
|
||||
tag: latest
|
||||
values: |
|
||||
foo: bar
|
||||
|
||||
+2
-2
@@ -43,7 +43,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: storefinder-backend
|
||||
image: 'docker.mycompany.com/mycomapny/frontend-admin:latest'
|
||||
image: 'storefinder/backend:latest'
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
@@ -93,7 +93,7 @@ spec:
|
||||
spec:
|
||||
containers:
|
||||
- name: storefinder-frontend
|
||||
image: 'docker.mycompany.com/mycomapny/frontend:latest'
|
||||
image: 'storefinder/frontend:latest'
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
|
||||
Vendored
+4
-3
@@ -2,6 +2,7 @@ version: "2.0"
|
||||
|
||||
global:
|
||||
host: mycompany.com
|
||||
enabled: true
|
||||
|
||||
squadron:
|
||||
storefinder:
|
||||
@@ -10,7 +11,7 @@ squadron:
|
||||
builds:
|
||||
default:
|
||||
tag: latest
|
||||
image: docker.mycompany.com/mycomapny/frontend
|
||||
image: storefinder/frontend
|
||||
values:
|
||||
image:
|
||||
tag: <% .Squadron.storefinder.frontend.builds.default.tag %>
|
||||
@@ -18,7 +19,7 @@ squadron:
|
||||
env:
|
||||
ENV: <% env "SHELL" %>
|
||||
GLOBAL: <% .Global.host %>
|
||||
BASE64: <% base64 "1234567890" %>
|
||||
BASE64: <% "1234567890" | b64enc %>
|
||||
DEFAULT_VALUE: <% "" | default "fallback" %>
|
||||
DEFAULT_INDEX_VALUE: <% defaultIndex .Global "notexists" "fallback" %>
|
||||
# ONE_PASSWORD: <% op "ACCOUNT_NAME" "UUID" "FIELD" %>
|
||||
@@ -31,7 +32,7 @@ squadron:
|
||||
builds:
|
||||
default:
|
||||
tag: latest
|
||||
image: docker.mycompany.com/mycomapny/frontend-admin
|
||||
image: storefinder/backend
|
||||
values:
|
||||
image:
|
||||
tag: <% .Squadron.storefinder.backend.builds.default.tag %>
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
version: "2.0"
|
||||
vars:
|
||||
bar:
|
||||
- one
|
||||
- two
|
||||
baz: null
|
||||
foo: two
|
||||
squadron:
|
||||
storefinder:
|
||||
backend:
|
||||
chart:
|
||||
name: backend
|
||||
repository: file://<% env "PROJECT_ROOT" %>/_examples/common/charts/backend
|
||||
version: 0.0.1
|
||||
builds:
|
||||
default:
|
||||
tag: latest
|
||||
image: storefinder/backend
|
||||
values:
|
||||
env:
|
||||
bar: <% .Vars.bar %>
|
||||
baz: <% .Vars.baz %>
|
||||
foo: <% .Vars.foo %>
|
||||
image:
|
||||
repository: <% .Squadron.storefinder.backend.builds.default.image %>
|
||||
tag: <% .Squadron.storefinder.backend.builds.default.tag %>
|
||||
Vendored
+26
@@ -0,0 +1,26 @@
|
||||
version: "2.0"
|
||||
vars:
|
||||
bar:
|
||||
- one
|
||||
- two
|
||||
baz: null
|
||||
foo: two
|
||||
squadron:
|
||||
storefinder:
|
||||
backend:
|
||||
chart:
|
||||
name: backend
|
||||
repository: file://./_examples/common/charts/backend
|
||||
version: 0.0.1
|
||||
builds:
|
||||
default:
|
||||
tag: latest
|
||||
image: storefinder/backend
|
||||
values:
|
||||
env:
|
||||
bar: [one two]
|
||||
baz: <no value>
|
||||
foo: two
|
||||
image:
|
||||
repository: storefinder/backend
|
||||
tag: latest
|
||||
Vendored
+50
@@ -0,0 +1,50 @@
|
||||
---
|
||||
# Source: backend/templates/service.yaml
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: storefinder-backend
|
||||
labels:
|
||||
app.kubernetes.io/name: storefinder-backend
|
||||
app.kubernetes.io/component: backend
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
helm.sh/chart: 'backend-0.0.1'
|
||||
namespace: default
|
||||
spec:
|
||||
type: ClusterIP
|
||||
selector:
|
||||
app.kubernetes.io/name: storefinder-backend
|
||||
app.kubernetes.io/component: backend
|
||||
ports:
|
||||
- name: http
|
||||
port: 80
|
||||
---
|
||||
# Source: backend/templates/deployment.yaml
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: storefinder-backend
|
||||
labels:
|
||||
app.kubernetes.io/name: storefinder-backend
|
||||
app.kubernetes.io/component: backend
|
||||
app.kubernetes.io/managed-by: Helm
|
||||
helm.sh/chart: 'backend-0.0.1'
|
||||
namespace: default
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: storefinder-backend
|
||||
app.kubernetes.io/component: backend
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app.kubernetes.io/name: storefinder-backend
|
||||
app.kubernetes.io/component: backend
|
||||
spec:
|
||||
containers:
|
||||
- name: storefinder-backend
|
||||
image: 'storefinder/backend:latest'
|
||||
ports:
|
||||
- name: http
|
||||
protocol: TCP
|
||||
containerPort: 80
|
||||
Vendored
+6
@@ -0,0 +1,6 @@
|
||||
version: "2.0"
|
||||
|
||||
vars:
|
||||
foo: "two"
|
||||
bar: ["two"]
|
||||
baz: ~
|
||||
Vendored
+23
@@ -0,0 +1,23 @@
|
||||
version: "2.0"
|
||||
|
||||
vars:
|
||||
foo: "one"
|
||||
bar: ["one"]
|
||||
baz: "one"
|
||||
|
||||
squadron:
|
||||
storefinder:
|
||||
backend:
|
||||
chart: <% env "PROJECT_ROOT" %>/_examples/common/charts/backend
|
||||
builds:
|
||||
default:
|
||||
tag: latest
|
||||
image: storefinder/backend
|
||||
values:
|
||||
image:
|
||||
tag: <% .Squadron.storefinder.backend.builds.default.tag %>
|
||||
repository: <% .Squadron.storefinder.backend.builds.default.image %>
|
||||
env:
|
||||
foo: <% .Vars.foo %>
|
||||
bar: <% .Vars.bar %>
|
||||
baz: <% .Vars.baz %>
|
||||
Reference in New Issue
Block a user