Skip to content

Commit

Permalink
Merge branch 'main' into SMFI-15-helm-chart-media-finder
Browse files Browse the repository at this point in the history
  • Loading branch information
stmoSub authored Nov 5, 2024
2 parents 1b34302 + 8b69428 commit 7a73e23
Show file tree
Hide file tree
Showing 14 changed files with 91 additions and 32 deletions.
2 changes: 1 addition & 1 deletion charts/sophora-cluster-common/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: sophora-cluster-common
description: A Helm chart containing some common resources useful for Sophora cloud setups
type: application
version: 1.1.3
version: 1.2.0
appVersion: "4"
41 changes: 41 additions & 0 deletions charts/sophora-cluster-common/templates/lb/ingress-grpc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{{- if and .Values.clusterServerLb.enabled .Values.clusterServerLb.grpcIngress.enabled }}
{{- $fullName := include "sophora-cluster-common.fullname" . -}}
{{- $ingressName := printf "%s-grpc" ($fullName | trunc 58 | trimSuffix "-") }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: {{ $ingressName }}
labels:
{{- include "sophora-cluster-common.labels" . | nindent 4 }}
{{- with .Values.clusterServerLb.grpcIngress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if .Values.clusterServerLb.grpcIngress.ingressClassName }}
ingressClassName: {{ .Values.clusterServerLb.grpcIngress.ingressClassName }}
{{- end -}}
{{- if .Values.clusterServerLb.grpcIngress.tls }}
tls:
{{- range .Values.clusterServerLb.grpcIngress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.clusterServerLb.grpcIngress.hosts }}
- host: {{ .host | quote }}
http:
paths:
- path: {{ .path }}
pathType: {{ default "ImplementationSpecific" .pathType }}
backend:
service:
name: {{ $.Values.clusterServerLb.name }}
port:
number: {{ $.Values.clusterServerLb.service.httpPort }}
{{- end }}
{{- end }}
9 changes: 9 additions & 0 deletions charts/sophora-cluster-common/test-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ clusterServerLb:
ingressClassName: "nginx"
hosts:
- host: "cms.mysophora.com"
grpcIngress:
enabled: true
ingressClassName: nginx
annotations:
nginx.ingress.kubernetes.io/use-regex: "true"
nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
hosts:
- host: "cms.mysophora.com"
path: /sophora\.grpc.*

podDisruptionBudget:
enabled: true
Expand Down
19 changes: 19 additions & 0 deletions charts/sophora-cluster-common/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,25 @@ clusterServerLb:
# - host: ""
# path: /

# This can be used to configure a different ingress for the gRPC service as gRPC may require different settings,
# e.g. nginx needs to be explicitly informed that the backend protocol is gRPC and that the path should be regex-matched.
grpcIngress:
enabled: false
# For Kubernetes >= 1.18 you should specify the ingress-controller via the field ingressClassName
# See https://kubernetes.io/blog/2020/04/02/improvements-to-the-ingress-api-in-kubernetes-1.18/#specifying-the-class-of-an-ingress
# ingressClassName: nginx
annotations: {}
# kubernetes.io/tls-acme: "true"
# nginx.ingress.kubernetes.io/use-regex: "true"
# nginx.ingress.kubernetes.io/backend-protocol: "GRPC"
hosts:
# - host: chart-example.local
# path: /sophora\.grpc.*
tls: []
# - secretName: chart-example-tls
# hosts:
# - chart-example.local

service:
## @param clusterServerLb.service.type Kubernetes service type
type: ClusterIP
Expand Down
2 changes: 1 addition & 1 deletion charts/sophora-image-update-service/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.0.1
version: 1.0.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
14 changes: 2 additions & 12 deletions charts/sophora-image-update-service/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,7 @@ spec:
{{- with .Values.livenessProbe }}
livenessProbe:
httpGet:
path: /actuator/health
port: http
failureThreshold: {{ .failureThreshold }}
initialDelaySeconds: {{ .initialDelaySeconds }}
periodSeconds: {{ .periodSeconds }}
timeoutSeconds: {{ .timeoutSeconds }}
{{- end }}
{{- with .Values.readinessProbe }}
readinessProbe:
httpGet:
path: /actuator/health
path: /actuator/health/liveness
port: http
failureThreshold: {{ .failureThreshold }}
initialDelaySeconds: {{ .initialDelaySeconds }}
Expand All @@ -83,7 +73,7 @@ spec:
{{- with .Values.startupProbe }}
startupProbe:
httpGet:
path: /actuator/health
path: /actuator/health/liveness
port: http
failureThreshold: {{ .failureThreshold }}
initialDelaySeconds: {{ .initialDelaySeconds }}
Expand Down
6 changes: 0 additions & 6 deletions charts/sophora-image-update-service/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,6 @@ startupProbe:
timeoutSeconds: 3
periodSeconds: 2

readinessProbe:
failureThreshold: 3
initialDelaySeconds: 1
timeoutSeconds: 3
periodSeconds: 5

livenessProbe:
failureThreshold: 1
initialDelaySeconds: 1
Expand Down
2 changes: 1 addition & 1 deletion charts/sophora-importer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.3.1
version: 1.3.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
10 changes: 4 additions & 6 deletions charts/sophora-importer/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,14 +78,12 @@ logbackXml: |
<jmxConfigurator/>
<appender name="jsonConsoleAppender" class="ch.qos.logback.core.ConsoleAppender">
<filter class="ch.qos.logback.core.filter.EvaluatorFilter">
<evaluator>
<!-- No log messages marked as 'SPECIAL_EMAIL_NOTIFICATION' should be shown. -->
<expression>marker != null &amp;&amp; marker.getName().equals("SPECIAL_EMAIL_NOTIFICATION")</expression>
</evaluator>
<!-- No log messages marked as 'SPECIAL_EMAIL_NOTIFICATION' should be shown. -->
<turboFilter class="ch.qos.logback.classic.turbo.MarkerFilter">
<Marker>SPECIAL_EMAIL_NOTIFICATION</Marker>
<OnMismatch>NEUTRAL</OnMismatch>
<OnMatch>DENY</OnMatch>
</filter>
</turboFilter>
<encoder class="net.logstash.logback.encoder.LogstashEncoder" />
</appender>
Expand Down
4 changes: 2 additions & 2 deletions charts/sophora-webclient/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.2.2
version: 1.3.0

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
appVersion: 4.8.0
appVersion: 4.14.0

maintainers:
- name: Team Weasel
Expand Down
6 changes: 5 additions & 1 deletion charts/sophora-webclient/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,18 @@ You can use the following values to customize the deployment
| `sophora.authentication.secret.passwordKey` | The key in the secret that contains the password | `password` | no |
| `sophora.authentication.secret.usernameKey` | The key in the secret that contains the username | `username` | no |
| `webclient.image.name` | The name of the docker image | `docker.subshell.com/sophora/sophora-webclient` | no |
| `webclient.image.version` | The version of the docker image | `master` | no |
| `webclient.image.tag` | The tag of the docker image | chart appVersion | no |
| `webclient.binaryFilesBase64` | A map of filename to base64 encoded file contents | The logo (logo.png) | no |
| `webclient.configuration` | The Sophora webclient `application.yml` file | | **yes** |
| `ingress.hosts` | An array of ingress hosts | | **yes** |
| `ingress.annotations` | A map of additional ingress annotations | `{}` | no |

## Changelog

### Version 1.3.0

* BREAKING: `image.version` was renamed to `image.tag`.

### Version 1.2.0

* `webclient.binaryFilesBase64` now accepts a map instead of an array.
2 changes: 1 addition & 1 deletion charts/sophora-webclient/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ spec:
{{- end }}
containers:
- name: webclient
image: "{{ .Values.image.name }}:{{ .Values.image.version }}"
image: "{{ .Values.image.name }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy | quote }}
env:
- name: SOPHORA_CLIENT_SERVERCONNECTION_USERNAME
Expand Down
3 changes: 3 additions & 0 deletions charts/sophora-webclient/test-values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
fullnameOverride: "test-webclient"

image:
tag: "latest"

sophora:
authentication:
secret:
Expand Down
3 changes: 2 additions & 1 deletion charts/sophora-webclient/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ fullnameOverride: ""

image:
name: docker.subshell.com/sophora/sophora-webclient
version: 4
# Overrides the image tag whose default is the chart appVersion.
tag: ""
pullPolicy: IfNotPresent

# - (object) k8s Pod host aliases which will be used to generate the /etc/hosts file.
Expand Down

0 comments on commit 7a73e23

Please sign in to comment.