Skip to content

Commit

Permalink
- Fixed service annotation:
Browse files Browse the repository at this point in the history
    Service annotation by service
  • Loading branch information
tde committed Oct 22, 2020
1 parent 1796e69 commit 30747a5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 25 deletions.
4 changes: 2 additions & 2 deletions Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
apiVersion: v2
name: microservice
version: 0.2.3
appVersion: 0.2.3
version: 0.2.4
appVersion: 0.2.4
description: A Helm chart which provide a DRY microservice deployment mechanism
keywords:
- microservice
Expand Down
6 changes: 3 additions & 3 deletions templates/_service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "microservice.fullname" $root }}-svc-{{ $service.name }}
{{- if $root.annotations }}
{{- if $service.annotations }}
annotations:
{{- range $key, $value := $root.annotations }}
{{ $key }}: {{ $value }}
{{- range $key, $value := $service.annotations }}
{{ $key }}: {{ $value }}
{{- end }}
{{- end }}
labels:
Expand Down
24 changes: 4 additions & 20 deletions values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,34 +16,18 @@ fullnameOverride: ""

#imagePullSecrets:
#serviceAccount:
# Annotation for the Deployment
annotations: {

annotations: {}

}
services:
- name: web
type: ClusterIP
annotations: {}
specs:
- port: 8000
targetPort: 8000
name: http
# - name: monitor
# type: LoadBalancer
# specs:
# - port: 8001
# name: monitor
# protocol: UDP
# - type: NodePort
# name: internal-com
# specs:
# - name: port1
# port: 8001
# targetPort: 8001
# protocol: TCP
# - name: port2
# type: ClusterIP
# port: 8002
# targetPort: 8002
# nodePort: 30081
#targetPort: is the port the container accepts traffic on,
#port: is the abstracted Service port, which can be any port other pods use to access the Service
#https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.16/#serviceport-v1-core
Expand Down

0 comments on commit 30747a5

Please sign in to comment.