Skip to content
Snippets Groups Projects
Commit 4539e183 authored by Alex Clemmer's avatar Alex Clemmer Committed by GitHub
Browse files

Merge pull request #152 from hausdorff/svc-proto-example

Add example to the service prototype's documentation
parents 9fc121fe 7f4b91c8
No related branches found
No related tags found
No related merge requests found
...@@ -46,14 +46,18 @@ namespace.`, ...@@ -46,14 +46,18 @@ namespace.`,
Name: "io.ksonnet.pkg.single-port-service", Name: "io.ksonnet.pkg.single-port-service",
Params: ParamSchemas{ Params: ParamSchemas{
RequiredParam("name", "serviceName", "Name of the service", String), RequiredParam("name", "serviceName", "Name of the service", String),
RequiredParam("targetLabelSelector", "selector", "Label for the service to target (e.g., 'app: MyApp').", Object), RequiredParam("targetLabelSelector", "selector", `Label for the service to target (e.g., "{app: 'MyApp'}").`, Object),
RequiredParam("servicePort", "port", "Port for the service to expose.", NumberOrString), RequiredParam("servicePort", "port", "Port for the service to expose.", NumberOrString),
RequiredParam("targetPort", "port", "Port for the service target.", NumberOrString), RequiredParam("targetPort", "port", "Port for the service target.", NumberOrString),
OptionalParam("protocol", "protocol", "Protocol to use (either TCP or UDP).", "TCP", String), OptionalParam("protocol", "protocol", "Protocol to use (either TCP or UDP).", "TCP", String),
}, },
Template: SnippetSchema{ Template: SnippetSchema{
Description: `A service that exposes 'servicePort', and directs traffic Description: `A service that exposes 'servicePort', and directs traffic
to 'targetLabelSelector', at 'targetPort'.`, to 'targetLabelSelector', at 'targetPort'. Since 'targetLabelSelector' is an
object literal that specifies which labels the service is meant to target, this
will typically look something like:
ksonnet prototype use service --targetLabelSelector "{app: 'nginx'}" [...]`,
ShortDescription: `Service that exposes a single port`, ShortDescription: `Service that exposes a single port`,
YAMLBody: []string{ YAMLBody: []string{
"kind: Service", "kind: Service",
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment