This repository has been archived by the owner on Aug 25, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 385
Conversation
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
jb-abbadie
force-pushed
the
add_service_annotations
branch
from
March 6, 2020 10:13
615c331
to
a24f568
Compare
lkysow
suggested changes
Mar 6, 2020
values.yaml
Outdated
# Extra annotations to attach to the server service | ||
# This should be a multi-line string mapping directly to the a map of | ||
# the annotations to apply to the server services | ||
serviceAnnotations: null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you make it like our other service annotation keys.
service:
# Optional YAML string for additional annotations.
# This should be a multi-line string of
# the annotations to apply to the server service.
annotations: null
templates/server-service.yaml
Outdated
@@ -15,6 +15,9 @@ metadata: | |||
heritage: {{ .Release.Service }} | |||
release: {{ .Release.Name }} | |||
annotations: | |||
{{- if .Values.server.serviceAnnotations }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a test to test/unit/server-service.bats
similar to the mesh gateway test:
#--------------------------------------------------------------------
# annotations
@test "meshGateway/Service: no annotations by default" {
cd `chart_dir`
local actual=$(helm template \
-x templates/mesh-gateway-service.yaml \
--set 'meshGateway.enabled=true' \
--set 'connectInject.enabled=true' \
--set 'client.grpc=true' \
--set 'meshGateway.service.enabled=true' \
. | tee /dev/stderr |
yq -r '.metadata.annotations' | tee /dev/stderr)
[ "${actual}" = "null" ]
}
@test "meshGateway/Service: can set annotations" {
cd `chart_dir`
local actual=$(helm template \
-x templates/mesh-gateway-service.yaml \
--set 'meshGateway.enabled=true' \
--set 'connectInject.enabled=true' \
--set 'client.grpc=true' \
--set 'meshGateway.service.enabled=true' \
--set 'meshGateway.service.annotations=key: value' \
. | tee /dev/stderr |
yq -r '.metadata.annotations.key' | tee /dev/stderr)
[ "${actual}" = "value" ]
}
templates/server-service.yaml
Outdated
@@ -15,6 +15,9 @@ metadata: | |||
heritage: {{ .Release.Service }} | |||
release: {{ .Release.Name }} | |||
annotations: | |||
{{- if .Values.server.serviceAnnotations }} | |||
{{- tpl .Values.server.serviceAnnotations . | nindent 4 }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
{{- tpl .Values.server.serviceAnnotations . | nindent 4 }} | |
{{- tpl .Values.server.serviceAnnotations . | nindent 4 | trim }} |
Thanks for the PR! Just a few comments. |
lkysow
added
area/chart-only
Related to changes that simply require yaml chart changes, e.g. exposing a new field
enhancement
New feature or request
waiting-on-response
Waiting on the issue creator for a response before taking further action
labels
Mar 6, 2020
jb-abbadie
force-pushed
the
add_service_annotations
branch
from
March 9, 2020 10:45
a24f568
to
8d2dac5
Compare
jb-abbadie
force-pushed
the
add_service_annotations
branch
from
March 9, 2020 10:45
8d2dac5
to
f9a536d
Compare
Fixed + Rebased based on the comments. |
lkysow
approved these changes
Mar 9, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area/chart-only
Related to changes that simply require yaml chart changes, e.g. exposing a new field
enhancement
New feature or request
waiting-on-response
Waiting on the issue creator for a response before taking further action
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This will allow users of External DNS to create a record with the Pod IP of the servers.