-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
46 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
templateName: "Service" | ||
description: "This template is used to create a generic Service for an application" | ||
type: "manifest" | ||
variables: | ||
- name: "PORT" | ||
type: "int" | ||
kind: "port" | ||
description: "the port exposed in the application" | ||
default: | ||
value: 80 | ||
- name: "APPNAME" | ||
type: "string" | ||
kind: "kubernetesResourceName" | ||
description: "the name of the application" | ||
- name: "PARTOF" | ||
type: "string" | ||
kind: "label" | ||
description: "the label to identify which project the resource belong to" | ||
- name: "GENERATORLABEL" | ||
type: "string" | ||
kind: "label" | ||
description: "the label to identify who generated the resource" | ||
default: | ||
value: "draft" | ||
- name: "TARGETPORT" | ||
type: "int" | ||
kind: "port" | ||
description: "the port the Service uses to make the application accessible from outside the cluster" | ||
default: | ||
referenceVar: "PORT" |
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,16 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{.APPNAME}} | ||
labels: | ||
app.kubernetes.io/name: {{.APPNAME}} | ||
app.kubernetes.io/part-of: {{.PARTOF}} | ||
kubernetes.azure.com/generator: {{.GENERATORLABEL}} | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: {{.APPNAME}} | ||
ports: | ||
- protocol: TCP | ||
port: {{.PORT}} | ||
targetPort: {{.TARGETPORT}} |