Skip to content

Commit

Permalink
Merge branch 'main' into davidgamero/generation-workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
davidgamero authored Oct 29, 2024
2 parents 79a6582 + 5d26ce8 commit 6885879
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 0 deletions.
30 changes: 30 additions & 0 deletions template/manifests/Service/draft.yaml
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 the service uses to make the application accessible from outside the cluster"
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 exposed in the application"
default:
referenceVar: "PORT"
16 changes: 16 additions & 0 deletions template/manifests/Service/service.yaml
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}}

0 comments on commit 6885879

Please sign in to comment.