Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(helm): adding property to define annotations on external service that would enable integration with external-dns #2636

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/helm-chart-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
--set sidecars.create=true \
--set serviceAccounts.create=true \
--set authorizationPolicies.create=true \
--set frontend.externalService=false \
--set frontend.externalService.create=false \
--set frontend.virtualService.create=true \
--set frontend.virtualService.gateway.name=asm-ingressgateway \
--set frontend.virtualService.gateway.namespace=asm-ingress \
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ helm upgrade onlineboutique oci://us-docker.pkg.dev/online-boutique-ci/charts/on
--install \
--create-namespace \
--set images.repository=us-docker.pkg.dev/my-project/containers/onlineboutique \
--set frontend.externalService=false \
--set frontend.externalService.create=false \
--set redis.create=false \
--set cartservice.database.type=spanner \
--set cartservice.database.connectionString=projects/my-project/instances/onlineboutique/databases/carts \
Expand Down
2 changes: 1 addition & 1 deletion helm-chart/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.frontend.create .Values.frontend.externalService }}
{{- if and .Values.frontend.create .Values.frontend.externalService.create }}
Note: It may take a few minutes for the LoadBalancer IP to be available.

Watch the status of the frontend IP address with:
Expand Down
10 changes: 7 additions & 3 deletions helm-chart/templates/frontend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,13 +146,17 @@ spec:
- name: http
port: 80
targetPort: 8080
{{- if .Values.frontend.externalService }}
{{- if .Values.frontend.externalService.create }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.frontend.name }}-external
namespace: {{ .Release.Namespace }}
{{- with .Values.frontend.externalService.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
type: LoadBalancer
selector:
Expand All @@ -177,7 +181,7 @@ spec:
- Ingress
- Egress
ingress:
{{- if .Values.frontend.externalService }}
{{- if .Values.frontend.externalService.create }}
- {}
{{- else }}
- from:
Expand Down Expand Up @@ -236,7 +240,7 @@ spec:
matchLabels:
app: {{ .Values.frontend.name }}
rules:
{{- if .Values.frontend.externalService }}
{{- if .Values.frontend.externalService.create }}
- to:
{{- else }}
- from:
Expand Down
4 changes: 3 additions & 1 deletion helm-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ emailService:
frontend:
create: true
name: frontend
externalService: true
externalService:
create: true
annotations: {}
cymbalBranding: false
# One of: local, gcp, aws, azure, onprem, alibaba. When not set, defaults to "local" unless running in GKE, otherwise auto-sets to gcp.
platform: local
Expand Down