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.`,
Name: "io.ksonnet.pkg.single-port-service",
Params: ParamSchemas{
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("targetPort", "port", "Port for the service target.", NumberOrString),
OptionalParam("protocol", "protocol", "Protocol to use (either TCP or UDP).", "TCP", String),
},
Template: SnippetSchema{
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`,
YAMLBody: []string{
"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