Skip to content

Commit

Permalink
fix(helmChart): rearrange K8s Services configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
Icikowski committed Nov 19, 2022
1 parent cf42364 commit f304f1e
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 27 deletions.
12 changes: 6 additions & 6 deletions dist/chart/goosymock/templates/NOTES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ Service installed successfully! Check out the documentation (https://icikowski.g

Ways to access the application:
1. Admin API:
- via {{ .Values.goosyMock.adminApi.service.type }} service:
HTTP on port {{ .Values.goosyMock.adminApi.service.port }}
- via {{ .Values.service.adminApi.type }} service:
HTTP on port {{ .Values.service.adminApi.port }}
{{- if .Values.goosyMock.adminApi.ssl.enabled }}
HTTPS on port {{ .Values.goosyMock.adminApi.service.securedPort }}
HTTPS on port {{ .Values.service.adminApi.securedPort }}
{{- end }}
{{- if .Values.ingress.adminApi.enabled }}
- via Ingress:
Expand All @@ -18,10 +18,10 @@ Ways to access the application:
{{- end }}
{{- end }}
2. Content Service:
- via {{ .Values.goosyMock.contentService.service.type }} service:
HTTP on port {{ .Values.goosyMock.contentService.service.port }}
- via {{ .Values.service.contentService.type }} service:
HTTP on port {{ .Values.service.contentService.port }}
{{- if .Values.goosyMock.contentService.ssl.enabled }}
HTTPS on port {{ .Values.goosyMock.contentService.service.securedPort }}
HTTPS on port {{ .Values.service.contentService.securedPort }}
{{- end }}
{{- if .Values.ingress.contentService.enabled }}
- via Ingress:
Expand Down
2 changes: 1 addition & 1 deletion dist/chart/goosymock/templates/ingress-admin.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if .Values.ingress.adminApi.enabled -}}
{{- $fullName := include "goosymock.fullname" . -}}
{{- $svcPort := .Values.goosyMock.adminApi.service.port -}}
{{- $svcPort := .Values.service.adminApi.port -}}
{{- if and .Values.ingress.adminApi.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.adminApi.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.adminApi.annotations "kubernetes.io/ingress.class" .Values.ingress.adminApi.className}}
Expand Down
2 changes: 1 addition & 1 deletion dist/chart/goosymock/templates/ingress-content.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if .Values.ingress.contentService.enabled -}}
{{- $fullName := include "goosymock.fullname" . -}}
{{- $svcPort := .Values.goosyMock.contentService.service.port -}}
{{- $svcPort := .Values.service.contentService.port -}}
{{- if and .Values.ingress.contentService.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.contentService.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.contentService.annotations "kubernetes.io/ingress.class" .Values.ingress.contentService.className}}
Expand Down
6 changes: 3 additions & 3 deletions dist/chart/goosymock/templates/service-admin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ metadata:
labels:
{{- include "goosymock.labels" . | nindent 4 }}
spec:
type: {{ .Values.goosyMock.adminApi.service.type }}
type: {{ .Values.service.adminApi.type }}
ports:
- port: {{ .Values.goosyMock.adminApi.service.port }}
- port: {{ .Values.service.adminApi.port }}
targetPort: admin-http
protocol: TCP
name: http
{{- if .Values.goosyMock.adminApi.ssl.enabled }}
- port: {{ .Values.goosyMock.adminApi.service.securedPort }}
- port: {{ .Values.service.adminApi.securedPort }}
targetPort: admin-https
protocol: TCP
name: https
Expand Down
6 changes: 3 additions & 3 deletions dist/chart/goosymock/templates/service-content.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ metadata:
labels:
{{- include "goosymock.labels" . | nindent 4 }}
spec:
type: {{ .Values.goosyMock.contentService.service.type }}
type: {{ .Values.service.contentService.type }}
ports:
- port: {{ .Values.goosyMock.contentService.service.port }}
- port: {{ .Values.service.contentService.port }}
targetPort: content-http
protocol: TCP
name: http
{{- if .Values.goosyMock.contentService.ssl.enabled }}
- port: {{ .Values.goosyMock.contentService.service.securedPort }}
- port: {{ .Values.service.contentService.securedPort }}
targetPort: content-https
protocol: TCP
name: https
Expand Down
25 changes: 12 additions & 13 deletions dist/chart/goosymock/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ goosyMock:
enabled: false
port: 8444
secretName: ""

# Kubernetes Service configuration
service:
type: ClusterIP
port: 80
securedPort: 443

# Content Service configuration
contentService:
Expand All @@ -52,18 +46,23 @@ goosyMock:
enabled: false
port: 8443
secretName: ""

# Kubernetes Service configuration
service:
type: ClusterIP
port: 80
securedPort: 443

# Health probes configuration
health:
port: 8888

# Ingress configuration for Admin API Service and Content Service
# Kubernetes Service configuration for Admin API Service and Content Service
service:
adminApi:
type: ClusterIP
port: 80
securedPort: 443
contentService:
type: ClusterIP
port: 80
securedPort: 443

# Kubernetes Ingress configuration for Admin API Service and Content Service
ingress:
adminApi:
enabled: false
Expand Down

0 comments on commit f304f1e

Please sign in to comment.