forked from argoproj/argo-cd
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: allow resolving repo root as jsonnet lib path (argoproj#11119)
Signed-off-by: shuai-zh <shuaiz8023@gmail.com> Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> Signed-off-by: emirot <emirot.nolan@gmail.com>
- Loading branch information
Showing
9 changed files
with
179 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
47 changes: 47 additions & 0 deletions
47
reposerver/repository/testdata/jsonnet-1/guestbook-ui.jsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
local service = import 'vendor/nested/service.libsonnet'; | ||
local params = import 'params.libsonnet'; | ||
|
||
function(tlaString, tlaCode) | ||
[ | ||
service.new(params), | ||
{ | ||
apiVersion: 'apps/v1beta2', | ||
kind: 'Deployment', | ||
metadata: { | ||
name: params.name, | ||
}, | ||
spec: { | ||
replicas: params.replicas, | ||
selector: { | ||
matchLabels: { | ||
app: params.name, | ||
}, | ||
}, | ||
template: { | ||
metadata: { | ||
labels: { | ||
app: params.name, | ||
tlaString: tlaString, | ||
tlaCode: tlaCode, | ||
extVarString: std.extVar('extVarString'), | ||
extVarCode: std.extVar('extVarCode'), | ||
}, | ||
}, | ||
spec: { | ||
containers: [ | ||
{ | ||
image: params.image, | ||
name: params.name, | ||
ports: [ | ||
{ | ||
containerPort: params.containerPort, | ||
}, | ||
], | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
null, | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
containerPort: 80, | ||
image: "gcr.io/heptio-images/ks-guestbook-demo:0.2", | ||
name: "guestbook-ui", | ||
replicas: 1, | ||
servicePort: 80, | ||
type: "ClusterIP", | ||
} |
23 changes: 23 additions & 0 deletions
23
reposerver/repository/testdata/jsonnet-1/vendor/nested/service.libsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
local new(params) = { | ||
apiVersion: 'v1', | ||
kind: 'Service', | ||
metadata: { | ||
name: params.name, | ||
}, | ||
spec: { | ||
ports: [ | ||
{ | ||
port: params.servicePort, | ||
targetPort: params.containerPort, | ||
}, | ||
], | ||
selector: { | ||
app: params.name, | ||
}, | ||
type: params.type, | ||
}, | ||
}; | ||
|
||
{ | ||
new:: new, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.