Skip to content

Commit

Permalink
add simple test app
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino committed Sep 24, 2023
1 parent c38988b commit 2f242c7
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 3 deletions.
19 changes: 19 additions & 0 deletions agent/example/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
spec:
selector:
matchLabels:
app: nginx
replicas: 2 # tells deployment to run 2 pods matching the template
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
21 changes: 21 additions & 0 deletions agent/example/ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: test
spec:
ingressClassName: nginx
tls:
- hosts:
- test.cd-demo.onplural.sh
secretName: test-tls
rules:
- host: test.cd-demo.onplural.sh
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: example
port:
name: http
15 changes: 15 additions & 0 deletions agent/example/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: v1
kind: Service
metadata:
name: example
labels:
app: example
spec:
type: ClusterIP
ports:
- port: 80
targetPort: 80
protocol: TCP
name: http
selector:
app: nginx
8 changes: 5 additions & 3 deletions agent/pkg/manifests/template/raw.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ import (
)

var (
liquidEngine = liquid.NewEngine()
liquidEngine = liquid.NewEngine()
sprigFunctions = []string{"toJson", "fromJson", "b64enc", "b64dec", "semverCompare", "sha256sum"}
)

func init() {
for name, fn := range sprig.TxtFuncMap() {
liquidEngine.RegisterFilter(name, fn)
fncs := sprig.TxtFuncMap()
for _, name := range sprigFunctions {
liquidEngine.RegisterFilter(name, fncs[name])
}
}

Expand Down

0 comments on commit 2f242c7

Please sign in to comment.