Merge pull request #2 from alexmt/jsonnet

Add jsonnet example
master
Alexander Matyushentsev 2018-09-10 13:45:54 -07:00 committed by GitHub
commit c86a7fbb8e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 67 additions and 0 deletions

View File

@ -8,6 +8,7 @@ to explore ArgoCD and GitOps!
|-------------|-------------| |-------------|-------------|
| [guestbook](guestbook/) | The ksonnet hello word application | | [guestbook](guestbook/) | The ksonnet hello word application |
| [helm-guestbook](helm-guestbook/) | The guestbook application as a Helm chart | | [helm-guestbook](helm-guestbook/) | The guestbook application as a Helm chart |
| [jsonnet-guestbook](jsonnet-guestbook/) | The guestbook application as a raw jsonnet |
| [pre-post-sync](pre-post-sync/) | Demonstrates ArgoCD PreSync and PostSync hooks | | [pre-post-sync](pre-post-sync/) | Demonstrates ArgoCD PreSync and PostSync hooks |
| [blue-green-deploy](blue-green-deploy/) | Demonstrates an ArgoCD Sync hook which performs a blue/green deployment | | [blue-green-deploy](blue-green-deploy/) | Demonstrates an ArgoCD Sync hook which performs a blue/green deployment |
| [sock-shop](sock-shop/) | A microservices demo application (https://microservices-demo.github.io) | | [sock-shop](sock-shop/) | A microservices demo application (https://microservices-demo.github.io) |

View File

@ -0,0 +1,58 @@
local params = import 'params.libsonnet';
[
{
"apiVersion": "v1",
"kind": "Service",
"metadata": {
"name": params.name
},
"spec": {
"ports": [
{
"port": params.servicePort,
"targetPort": params.containerPort
}
],
"selector": {
"app": params.name
},
"type": params.type
}
},
{
"apiVersion": "apps/v1beta2",
"kind": "Deployment",
"metadata": {
"name": params.name
},
"spec": {
"replicas": params.replicas,
"selector": {
"matchLabels": {
"app": params.name
},
},
"template": {
"metadata": {
"labels": {
"app": params.name
}
},
"spec": {
"containers": [
{
"image": params.image,
"name": params.name,
"ports": [
{
"containerPort": params.containerPort
}
]
}
]
}
}
}
}
]

View File

@ -0,0 +1,8 @@
{
containerPort: 80,
image: "gcr.io/heptio-images/ks-guestbook-demo:0.2",
name: "guestbook-ui",
replicas: 1,
servicePort: 80,
type: "LoadBalancer",
}