fix(autopush): add router of autoconnect to service

This commit is contained in:
WrenIX 2025-01-19 23:55:11 +01:00
parent e2052a56ff
commit db242ac7f6
Signed by: wrenix
GPG key ID: 7AFDB012974B1BB5
6 changed files with 15 additions and 7 deletions

View file

@ -3,7 +3,7 @@ name: autopush
description: A Helm chart for Kubernetes description: A Helm chart for Kubernetes
icon: icon:
type: application type: application
version: 0.0.7 version: 0.0.8
# renovate: image=docker.io/mozilla-services/autopush-rs # renovate: image=docker.io/mozilla-services/autopush-rs
appVersion: "1.72.2" appVersion: "1.72.2"
maintainers: maintainers:

View file

@ -7,7 +7,7 @@ description: "A Helm chart for Kubernetes"
# autopush # autopush
![Version: 0.0.7](https://img.shields.io/badge/Version-0.0.7-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.72.2](https://img.shields.io/badge/AppVersion-1.72.2-informational?style=flat-square) ![Version: 0.0.8](https://img.shields.io/badge/Version-0.0.8-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 1.72.2](https://img.shields.io/badge/AppVersion-1.72.2-informational?style=flat-square)
A Helm chart for Kubernetes A Helm chart for Kubernetes
@ -78,7 +78,8 @@ helm uninstall autopush-release
| autoconnect.replicaCount | int | `1` | This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ | | autoconnect.replicaCount | int | `1` | This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ |
| autoconnect.resources | object | `{}` | We usually recommend not to specify default resources and to leave this as a conscious choice for the user. This also increases chances charts run on environments with little resources, such as Minikube. If you do want to specify resources, uncomment the following lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: cpu: 100m memory: 128Mi requests: cpu: 100m memory: 128Mi | | autoconnect.resources | object | `{}` | We usually recommend not to specify default resources and to leave this as a conscious choice for the user. This also increases chances charts run on environments with little resources, such as Minikube. If you do want to specify resources, uncomment the following lines, adjust them as necessary, and remove the curly braces after 'resources:'. limits: cpu: 100m memory: 128Mi requests: cpu: 100m memory: 128Mi |
| autoconnect.securityContext | object | `{}` | securityContext capabilities: drop: - ALL readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1000 | | autoconnect.securityContext | object | `{}` | securityContext capabilities: drop: - ALL readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 1000 |
| autoconnect.service.port | int | `80` | | | autoconnect.service.ports.http | int | `80` | |
| autoconnect.service.ports.router | int | `8081` | |
| autoconnect.service.type | string | `"ClusterIP"` | | | autoconnect.service.type | string | `"ClusterIP"` | |
| autoconnect.tolerations | list | `[]` | | | autoconnect.tolerations | list | `[]` | |
| autoconnect.volumeMounts | list | `[]` | Additional volumeMounts on the output Deployment definition. - name: foo mountPath: "/etc/foo" readOnly: true | | autoconnect.volumeMounts | list | `[]` | Additional volumeMounts on the output Deployment definition. - name: foo mountPath: "/etc/foo" readOnly: true |
@ -137,8 +138,8 @@ helm uninstall autopush-release
| prometheus.volumeMounts | list | `[]` | Additional volumeMounts on the output Deployment definition. - name: foo mountPath: "/etc/foo" readOnly: true | | prometheus.volumeMounts | list | `[]` | Additional volumeMounts on the output Deployment definition. - name: foo mountPath: "/etc/foo" readOnly: true |
| redis.architecture | string | `"standalone"` | | | redis.architecture | string | `"standalone"` | |
| redis.auth.enabled | bool | `true` | | | redis.auth.enabled | bool | `true` | |
| redis.auth.existingSecret | string | `""` | name of an existing secret with Redis credentials (instead of auth.password), must be created ahead of time |
| redis.auth.existingSecret | string | `nil` | Or use existing secret with "redis-password" key instead of static password | | redis.auth.existingSecret | string | `nil` | Or use existing secret with "redis-password" key instead of static password |
| redis.auth.existingSecret | string | `""` | name of an existing secret with Redis credentials (instead of auth.password), must be created ahead of time |
| redis.auth.existingSecretPasswordKey | string | `""` | Password key to be retrieved from existing secret | | redis.auth.existingSecretPasswordKey | string | `""` | Password key to be retrieved from existing secret |
| redis.auth.password | string | `"autopush"` | XXX Change me! | | redis.auth.password | string | `"autopush"` | XXX Change me! |
| redis.dbid | int | `0` | Database ID for non-default database | | redis.dbid | int | `0` | Database ID for non-default database |

View file

@ -59,7 +59,7 @@ spec:
containerPort: 8080 containerPort: 8080
protocol: TCP protocol: TCP
- name: router - name: router
containerPort: 8081 containerPort: {{ .service.ports.router }}
protocol: TCP protocol: TCP
livenessProbe: livenessProbe:
{{- toYaml .livenessProbe | nindent 12 }} {{- toYaml .livenessProbe | nindent 12 }}

View file

@ -10,10 +10,14 @@ spec:
{{- include "autopush.selectorLabels" . | nindent 4 }} {{- include "autopush.selectorLabels" . | nindent 4 }}
app.kubernetes.io/component: autoconnect app.kubernetes.io/component: autoconnect
ports: ports:
- port: {{ .Values.autoconnect.service.port }} - port: {{ .Values.autoconnect.service.ports.http }}
targetPort: http targetPort: http
protocol: TCP protocol: TCP
name: http name: http
- port: {{ .Values.autoconnect.service.ports.router }}
targetPort: router
protocol: TCP
name: router
{{- if .Values.prometheus.enabled }} {{- if .Values.prometheus.enabled }}
- port: 9100 - port: 9100
targetPort: metrics targetPort: metrics

View file

@ -33,6 +33,7 @@ data:
{{- end }} {{- end }}
AUTOCONNECT__ENDPOINT_HOSTNAME: {{ printf "updates.%s" .Values.ingress.host | b64enc }} AUTOCONNECT__ENDPOINT_HOSTNAME: {{ printf "updates.%s" .Values.ingress.host | b64enc }}
AUTOCONNECT__ROUTER_HOSTNAME: {{ printf "%s-autoconnect" (include "autopush.fullname" .) | b64enc }} AUTOCONNECT__ROUTER_HOSTNAME: {{ printf "%s-autoconnect" (include "autopush.fullname" .) | b64enc }}
AUTOCONNECT__ROUTER_PORT: {{ toYaml .Values.autoconnect.service.ports.router | b64enc }}
{{- if .Values.prometheus.enabled }} {{- if .Values.prometheus.enabled }}
AUTOCONNECT__STATSD_HOST: {{ "127.0.0.1" | b64enc}} AUTOCONNECT__STATSD_HOST: {{ "127.0.0.1" | b64enc}}
AUTOCONNECT__STATSD_PORT: {{ "9125" | b64enc }} AUTOCONNECT__STATSD_PORT: {{ "9125" | b64enc }}

View file

@ -164,7 +164,9 @@ autoconnect:
# This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types # This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types
type: ClusterIP type: ClusterIP
# This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports # This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports
port: 80 ports:
http: 80
router: 8081
# -- We usually recommend not to specify default resources and to leave this as a conscious # -- We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little # choice for the user. This also increases chances charts run on environments with little