From 5dc99842f2798e416e7e909bcbafb1ef65332d08 Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Tue, 3 Jun 2025 17:45:50 +0200 Subject: [PATCH 01/24] dev: add service simple ui --- charts/hawkbit/templates/servicesimpleui.yaml | 20 +++++++++++++++++++ charts/hawkbit/values.yaml | 14 +++++++++++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 charts/hawkbit/templates/servicesimpleui.yaml diff --git a/charts/hawkbit/templates/servicesimpleui.yaml b/charts/hawkbit/templates/servicesimpleui.yaml new file mode 100644 index 00000000..0bb847d8 --- /dev/null +++ b/charts/hawkbit/templates/servicesimpleui.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: "{{ include "hawkbit.fullname" . }}-simple-ui" + labels: +{{ include "hawkbit.labels" . | indent 4 }} + {{- with .Values.serviceSimpleUI.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + type: {{ .Values.serviceSimpleUI.type }} + ports: + - port: {{ .Values.serviceSimpleUI.port }} + targetPort: http + protocol: TCP + name: http + selector: + app.kubernetes.io/name: "{{ include "hawkbit.name" . }}-simple-ui" + app.kubernetes.io/instance: "{{ .Release.Name }}-simple-ui" diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index 44a4c17b..a535e369 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -15,7 +15,12 @@ image: repository: "hawkbit/hawkbit-update-server" - tag: 0.5.0-mysql + tag: "0.8.0" + pullPolicy: IfNotPresent + +imageSimpleUI: + repository: "hawkbit/hawkbit-simple-ui" + tag: "0.8.0" pullPolicy: IfNotPresent replicaCount: 1 @@ -45,10 +50,15 @@ fullnameOverride: "" service: type: ClusterIP - port: 80 + port: 8080 annotations: {} # traefik.ingress.kubernetes.io/affinity: "true" +serviceSimpleUI: + type: ClusterIP + port: 8088 + annotations: {} + livenessProbe: initialDelaySeconds: 240 timeoutSeconds: 5 From f9e239728ce361ca592bbb967a7b3238325bf994 Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Wed, 4 Jun 2025 14:28:12 +0200 Subject: [PATCH 02/24] add host --- charts/hawkbit/values.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index a535e369..256b79ad 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -75,6 +75,8 @@ ingress: hosts: - host: hawkbit.local paths: [] + - host: hawkbit.simpleui + paths: [] tls: [] # - secretName: hawkbit-tls # hosts: From bc3c5e88ac61a6371df4d197a174aae43477650b Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Wed, 4 Jun 2025 16:53:21 +0200 Subject: [PATCH 03/24] add host --- charts/hawkbit/values.yaml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index 256b79ad..9ddca7b5 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -74,9 +74,7 @@ ingress: # kubernetes.io/tls-acme: "true" hosts: - host: hawkbit.local - paths: [] - - host: hawkbit.simpleui - paths: [] + paths: [hawkbit, "hawkbit-simple-ui"] tls: [] # - secretName: hawkbit-tls # hosts: From fc7b2ceba96342aa7272d583b92a88b83ac40364 Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Wed, 4 Jun 2025 16:59:30 +0200 Subject: [PATCH 04/24] add host --- charts/hawkbit/values.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index 9ddca7b5..be30ab4e 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -72,9 +72,12 @@ ingress: annotations: {} # ingress.kubernetes.io/ssl-redirect: "true" # kubernetes.io/tls-acme: "true" + ## ingress service multiple host so has to have api on https://hawkbit.sbx.agreg.io/ and ui on https://hawkbit-simple-ui.sbx.agreg.io/ hosts: - host: hawkbit.local - paths: [hawkbit, "hawkbit-simple-ui"] + paths: [] + - host: hawkbit-simple-ui + paths: [] tls: [] # - secretName: hawkbit-tls # hosts: From 38fb995596b028ff69dd53a48ad244790b42be70 Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Wed, 4 Jun 2025 17:51:06 +0200 Subject: [PATCH 05/24] dev: sert correct version --- charts/hawkbit/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/hawkbit/Chart.yaml b/charts/hawkbit/Chart.yaml index f2bfa03f..42dda3a6 100644 --- a/charts/hawkbit/Chart.yaml +++ b/charts/hawkbit/Chart.yaml @@ -11,7 +11,7 @@ --- apiVersion: v2 version: 1.7.0 -appVersion: "0.5.0-mysql" +appVersion: "0.8.0" description: | Eclipse hawkBit™ is a domain independent back-end framework for rolling out software updates to constrained edge devices as well as more powerful controllers and gateways connected to From 7c830044eb68e33e23869d48eb54ec1b6ffbfa3a Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Wed, 4 Jun 2025 17:52:07 +0200 Subject: [PATCH 06/24] link service and deployemente --- .../templates/deployment-simple-ui.yaml | 126 ++++++++++++++++++ charts/hawkbit/templates/servicesimpleui.yaml | 4 +- 2 files changed, 128 insertions(+), 2 deletions(-) create mode 100644 charts/hawkbit/templates/deployment-simple-ui.yaml diff --git a/charts/hawkbit/templates/deployment-simple-ui.yaml b/charts/hawkbit/templates/deployment-simple-ui.yaml new file mode 100644 index 00000000..f76faf25 --- /dev/null +++ b/charts/hawkbit/templates/deployment-simple-ui.yaml @@ -0,0 +1,126 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: "{{ include "hawkbit.fullname" . }}-simple-ui-deployement" + labels: + app.kubernetes.io/name: "{{ include "hawkbit.name" . }}-simple-ui" +spec: + replicas: {{ .Values.replicaCount }} + strategy: + {{- with .Values.updateStrategy }} + {{- toYaml . | nindent 4 }} + {{- end }} + selector: + matchLabels: + app.kubernetes.io/name: "{{ include "hawkbit.name" . }}-simple-ui" + app.kubernetes.io/instance: {{ .Release.Name }} + template: + metadata: + labels: + app.kubernetes.io/name: "{{ include "hawkbit.name" . }}-simple-ui" + app.kubernetes.io/instance: {{ .Release.Name }} + annotations: + checksum/config: {{ include (print .Template.BasePath "/secrets.yaml") . | sha256sum }} + {{- with .Values.podTemplate.annotations }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.image.pullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: {{ .Chart.Name }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + env: + - name: SPRING_PROFILES_ACTIVE + value: "{{ .Values.spring.profiles }}" + - name: "SPRING_DATASOURCE_URL" + {{- if .Values.env.springDatasourceUrl }} + value: "{{ .Values.env.springDatasourceUrl }}" + {{- else }} + value: "jdbc:mariadb://{{ if .Values.mysql.enabled }}{{ .Release.Name }}-mysql{{ else }}{{ .Values.env.springDatasourceHost }}{{ end }}:3306/{{ .Values.env.springDatasourceDb }}" + {{- end }} + - name: "SPRING_APPLICATION_JSON" + valueFrom: + secretKeyRef: + name: {{ include "hawkbit.fullname" . }} + key: "SPRING_APPLICATION_JSON" + - name: "SPRING_RABBITMQ_HOST" + value: "{{ if .Values.rabbitmq.enabled }}{{ .Release.Name }}-rabbitmq{{ else }}{{ .Values.env.springRabbitmqHost }}{{ end }}" + - name: "SPRING_RABBITMQ_USERNAME" + value: "{{ .Values.env.springRabbitmqUsername }}" + - name: "SPRING_RABBITMQ_PASSWORD" + valueFrom: + secretKeyRef: + name: "{{ template "hawkbit.fullname" . }}-rabbitmq-pass" + key: "rabbitmq-pass" + {{- if .Values.fileStorage.enabled }} + - name: "org.eclipse.hawkbit.repository.file.path" + value: {{ .Values.fileStorage.mountPath }} + {{- end }} + {{- range $key, $value := .Values.extraEnv }} + - name: "{{ $key }}" + value: "{{ $value }}" + {{- end }} + ports: + - name: http + containerPort: 8080 + protocol: TCP + livenessProbe: + httpGet: + path: /swagger-ui/index.html + port: http + initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} + timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} + readinessProbe: + httpGet: + path: /swagger-ui/index.html + port: http + initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} + timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} + volumeMounts: + - name: configmap + mountPath: {{ .Values.configMap.mountPath }} + {{- if .Values.fileStorage.enabled }} + - name: storage + mountPath: {{ .Values.fileStorage.mountPath }} + {{- end }} + {{- if .Values.extraVolumeMounts }} + {{ toYaml .Values.extraVolumeMounts | nindent 12 }} + {{- end }} + resources: +{{ toYaml .Values.resources | indent 12 }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- if .Values.securityContext.enabled }} + securityContext: + fsGroup: {{ .Values.securityContext.fsGroup }} + runAsUser: {{ .Values.securityContext.runAsUser }} + {{- if .Values.securityContext.extra }} + {{- toYaml .Values.securityContext.extra | nindent 8 }} + {{- end }} + {{- end }} + volumes: + - name: configmap + configMap: + name: {{ include "hawkbit.fullname" . }} + {{- if .Values.fileStorage.enabled }} + - name: storage + persistentVolumeClaim: + claimName: {{ include "hawkbit.fullname" . }}-data + {{- end}} + {{- if .Values.extraVolumes }} + {{ toYaml .Values.extraVolumes | nindent 6 }} + {{- end }} diff --git a/charts/hawkbit/templates/servicesimpleui.yaml b/charts/hawkbit/templates/servicesimpleui.yaml index 0bb847d8..33c2c1a2 100644 --- a/charts/hawkbit/templates/servicesimpleui.yaml +++ b/charts/hawkbit/templates/servicesimpleui.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: "{{ include "hawkbit.fullname" . }}-simple-ui" + name: "{{ include "hawkbit.fullname" . }}-simple-ui-service" labels: -{{ include "hawkbit.labels" . | indent 4 }} + app.kubernetes.io/name: "{{ include "hawkbit.name" . }}-simple-ui" {{- with .Values.serviceSimpleUI.annotations }} annotations: {{- toYaml . | nindent 4 }} From 5db6baaedb40a00aba9be2065f65fdfe1023dc55 Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Wed, 4 Jun 2025 18:01:16 +0200 Subject: [PATCH 07/24] dev: add simple ui --- charts/hawkbit/templates/deployment-simple-ui.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/charts/hawkbit/templates/deployment-simple-ui.yaml b/charts/hawkbit/templates/deployment-simple-ui.yaml index f76faf25..7c608c83 100644 --- a/charts/hawkbit/templates/deployment-simple-ui.yaml +++ b/charts/hawkbit/templates/deployment-simple-ui.yaml @@ -25,14 +25,14 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: - {{- with .Values.image.pullSecrets }} + {{- with .Values.imageSimpleUI.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} containers: - name: {{ .Chart.Name }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} + image: "{{ .Values.imageSimpleUI.repository }}:{{ .Values.imageSimpleUI.tag }}" + imagePullPolicy: {{ .Values.imageSimpleUI.pullPolicy }} env: - name: SPRING_PROFILES_ACTIVE value: "{{ .Values.spring.profiles }}" @@ -70,13 +70,13 @@ spec: protocol: TCP livenessProbe: httpGet: - path: /swagger-ui/index.html + path: /login port: http initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} readinessProbe: httpGet: - path: /swagger-ui/index.html + path: /login port: http initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} From 3eb7dc79d2e1f8b94f527cc833fffb91ed102a22 Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Wed, 4 Jun 2025 18:02:22 +0200 Subject: [PATCH 08/24] remove copy past un-used volum --- .../templates/deployment-simple-ui.yaml | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/charts/hawkbit/templates/deployment-simple-ui.yaml b/charts/hawkbit/templates/deployment-simple-ui.yaml index 7c608c83..35a06e83 100644 --- a/charts/hawkbit/templates/deployment-simple-ui.yaml +++ b/charts/hawkbit/templates/deployment-simple-ui.yaml @@ -80,16 +80,6 @@ spec: port: http initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} - volumeMounts: - - name: configmap - mountPath: {{ .Values.configMap.mountPath }} - {{- if .Values.fileStorage.enabled }} - - name: storage - mountPath: {{ .Values.fileStorage.mountPath }} - {{- end }} - {{- if .Values.extraVolumeMounts }} - {{ toYaml .Values.extraVolumeMounts | nindent 12 }} - {{- end }} resources: {{ toYaml .Values.resources | indent 12 }} {{- with .Values.nodeSelector }} @@ -111,16 +101,4 @@ spec: {{- if .Values.securityContext.extra }} {{- toYaml .Values.securityContext.extra | nindent 8 }} {{- end }} - {{- end }} - volumes: - - name: configmap - configMap: - name: {{ include "hawkbit.fullname" . }} - {{- if .Values.fileStorage.enabled }} - - name: storage - persistentVolumeClaim: - claimName: {{ include "hawkbit.fullname" . }}-data - {{- end}} - {{- if .Values.extraVolumes }} - {{ toYaml .Values.extraVolumes | nindent 6 }} - {{- end }} + {{- end }} \ No newline at end of file From e772566c3578706b18a398fff90448ce9fba01e7 Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Wed, 4 Jun 2025 18:13:19 +0200 Subject: [PATCH 09/24] set correct env variable simple ui deployement --- .../templates/deployment-simple-ui.yaml | 32 ++----------------- charts/hawkbit/values.yaml | 3 ++ 2 files changed, 5 insertions(+), 30 deletions(-) diff --git a/charts/hawkbit/templates/deployment-simple-ui.yaml b/charts/hawkbit/templates/deployment-simple-ui.yaml index 35a06e83..05d922db 100644 --- a/charts/hawkbit/templates/deployment-simple-ui.yaml +++ b/charts/hawkbit/templates/deployment-simple-ui.yaml @@ -34,36 +34,8 @@ spec: image: "{{ .Values.imageSimpleUI.repository }}:{{ .Values.imageSimpleUI.tag }}" imagePullPolicy: {{ .Values.imageSimpleUI.pullPolicy }} env: - - name: SPRING_PROFILES_ACTIVE - value: "{{ .Values.spring.profiles }}" - - name: "SPRING_DATASOURCE_URL" - {{- if .Values.env.springDatasourceUrl }} - value: "{{ .Values.env.springDatasourceUrl }}" - {{- else }} - value: "jdbc:mariadb://{{ if .Values.mysql.enabled }}{{ .Release.Name }}-mysql{{ else }}{{ .Values.env.springDatasourceHost }}{{ end }}:3306/{{ .Values.env.springDatasourceDb }}" - {{- end }} - - name: "SPRING_APPLICATION_JSON" - valueFrom: - secretKeyRef: - name: {{ include "hawkbit.fullname" . }} - key: "SPRING_APPLICATION_JSON" - - name: "SPRING_RABBITMQ_HOST" - value: "{{ if .Values.rabbitmq.enabled }}{{ .Release.Name }}-rabbitmq{{ else }}{{ .Values.env.springRabbitmqHost }}{{ end }}" - - name: "SPRING_RABBITMQ_USERNAME" - value: "{{ .Values.env.springRabbitmqUsername }}" - - name: "SPRING_RABBITMQ_PASSWORD" - valueFrom: - secretKeyRef: - name: "{{ template "hawkbit.fullname" . }}-rabbitmq-pass" - key: "rabbitmq-pass" - {{- if .Values.fileStorage.enabled }} - - name: "org.eclipse.hawkbit.repository.file.path" - value: {{ .Values.fileStorage.mountPath }} - {{- end }} - {{- range $key, $value := .Values.extraEnv }} - - name: "{{ $key }}" - value: "{{ $value }}" - {{- end }} + - name: SPRING_APPLICATION_JSON + value: {{ .Values.envSimpleUI.springAppJson | toJson | quote }} ports: - name: http containerPort: 8080 diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index be30ab4e..a208d3e4 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -103,6 +103,9 @@ env: springRabbitmqUsername: "hawkbit" springRabbitmqPassword: "hawkbit" +envSimpleUI: + springAppJson: {"hawkbit.server.mgmtUrl": "http://hawkbit:8080"} + # optional env vars extraEnv: {} # JAVA_TOOL_OPTIONS: "-Xms1024m -Xmx1024m" From f9e57de515fe0b62a7127bd0161213e211916649 Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Wed, 4 Jun 2025 18:15:22 +0200 Subject: [PATCH 10/24] set correct port --- charts/hawkbit/templates/deployment-simple-ui.yaml | 2 +- charts/hawkbit/templates/servicesimpleui.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/hawkbit/templates/deployment-simple-ui.yaml b/charts/hawkbit/templates/deployment-simple-ui.yaml index 05d922db..4989da0b 100644 --- a/charts/hawkbit/templates/deployment-simple-ui.yaml +++ b/charts/hawkbit/templates/deployment-simple-ui.yaml @@ -38,7 +38,7 @@ spec: value: {{ .Values.envSimpleUI.springAppJson | toJson | quote }} ports: - name: http - containerPort: 8080 + containerPort: {{ .Values.serviceSimpleUI.port }} protocol: TCP livenessProbe: httpGet: diff --git a/charts/hawkbit/templates/servicesimpleui.yaml b/charts/hawkbit/templates/servicesimpleui.yaml index 33c2c1a2..82de2ac6 100644 --- a/charts/hawkbit/templates/servicesimpleui.yaml +++ b/charts/hawkbit/templates/servicesimpleui.yaml @@ -12,7 +12,7 @@ spec: type: {{ .Values.serviceSimpleUI.type }} ports: - port: {{ .Values.serviceSimpleUI.port }} - targetPort: http + targetPort: {{ .Values.serviceSimpleUI.port }} protocol: TCP name: http selector: From ba42d0e47cef49152fa13eddfa1f97b55a7ca28d Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Thu, 5 Jun 2025 17:47:51 +0200 Subject: [PATCH 11/24] fix env --- charts/hawkbit/templates/deployment.yaml | 4 ++-- charts/hawkbit/values.yaml | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/charts/hawkbit/templates/deployment.yaml b/charts/hawkbit/templates/deployment.yaml index 614581af..7b36d019 100644 --- a/charts/hawkbit/templates/deployment.yaml +++ b/charts/hawkbit/templates/deployment.yaml @@ -34,7 +34,7 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" imagePullPolicy: {{ .Values.image.pullPolicy }} env: - - name: SPRING_PROFILES_ACTIVE + - name: PROFILES value: "{{ .Values.spring.profiles }}" - name: "SPRING_DATASOURCE_URL" {{- if .Values.env.springDatasourceUrl }} @@ -42,7 +42,7 @@ spec: {{- else }} value: "jdbc:mariadb://{{ if .Values.mysql.enabled }}{{ .Release.Name }}-mysql{{ else }}{{ .Values.env.springDatasourceHost }}{{ end }}:3306/{{ .Values.env.springDatasourceDb }}" {{- end }} - - name: "SPRING_APPLICATION_JSON" + - name: "SPRING_APPLICATION_JSON" ## secret incluing the env SPRING_DATASOURCE_USERNAME TO TEST valueFrom: secretKeyRef: name: {{ include "hawkbit.fullname" . }} diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index a208d3e4..6c21088d 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -98,10 +98,10 @@ env: springDatasourceHost: "hawkbit-mysql" springDatasourceDb: "hawkbit" # if springDatasourceUrl is set override default mysql db url - springDatasourceUrl: "" - springRabbitmqHost: "hawkbit-rabbitmq" - springRabbitmqUsername: "hawkbit" - springRabbitmqPassword: "hawkbit" + springDatasourceUrl: "jdbc:mariadb://mysql:3306/hawkbit" + springRabbitmqHost: "rabbitmq" + springRabbitmqUsername: "guest" + springRabbitmqPassword: "guest" envSimpleUI: springAppJson: {"hawkbit.server.mgmtUrl": "http://hawkbit:8080"} @@ -184,7 +184,7 @@ config: # the "{noop}" prefix is needed! password: "{noop}admin" datasource: - username: hawkbit + username: root password: hawkbit From 9d84b222da03de77748746ea6cb64c64e87bedcc Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Thu, 5 Jun 2025 18:42:13 +0200 Subject: [PATCH 12/24] rename port simple ui --- charts/hawkbit/templates/deployment-simple-ui.yaml | 6 +++--- charts/hawkbit/templates/deployment.yaml | 2 +- charts/hawkbit/templates/servicesimpleui.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/charts/hawkbit/templates/deployment-simple-ui.yaml b/charts/hawkbit/templates/deployment-simple-ui.yaml index 4989da0b..fdd7820e 100644 --- a/charts/hawkbit/templates/deployment-simple-ui.yaml +++ b/charts/hawkbit/templates/deployment-simple-ui.yaml @@ -37,19 +37,19 @@ spec: - name: SPRING_APPLICATION_JSON value: {{ .Values.envSimpleUI.springAppJson | toJson | quote }} ports: - - name: http + - name: http-simple-ui containerPort: {{ .Values.serviceSimpleUI.port }} protocol: TCP livenessProbe: httpGet: path: /login - port: http + port: http-simple-ui initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} readinessProbe: httpGet: path: /login - port: http + port: http-simple-ui initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} resources: diff --git a/charts/hawkbit/templates/deployment.yaml b/charts/hawkbit/templates/deployment.yaml index 7b36d019..1d3066f5 100644 --- a/charts/hawkbit/templates/deployment.yaml +++ b/charts/hawkbit/templates/deployment.yaml @@ -66,7 +66,7 @@ spec: {{- end }} ports: - name: http - containerPort: 8080 + containerPort: {{ .Values.service.port }} protocol: TCP livenessProbe: httpGet: diff --git a/charts/hawkbit/templates/servicesimpleui.yaml b/charts/hawkbit/templates/servicesimpleui.yaml index 82de2ac6..e9e9df9b 100644 --- a/charts/hawkbit/templates/servicesimpleui.yaml +++ b/charts/hawkbit/templates/servicesimpleui.yaml @@ -12,9 +12,9 @@ spec: type: {{ .Values.serviceSimpleUI.type }} ports: - port: {{ .Values.serviceSimpleUI.port }} - targetPort: {{ .Values.serviceSimpleUI.port }} + targetPort: http-simple-ui protocol: TCP - name: http + name: http-simple-ui selector: app.kubernetes.io/name: "{{ include "hawkbit.name" . }}-simple-ui" app.kubernetes.io/instance: "{{ .Release.Name }}-simple-ui" From d21f6d4f4b6388662f83ad1eb6fba6137ffcdc84 Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Fri, 6 Jun 2025 17:31:44 +0200 Subject: [PATCH 13/24] dev: seperate conf ingress host simple ui and hawkbit --- charts/hawkbit/templates/ingress.yaml | 26 ++++++++++++++++--- charts/hawkbit/templates/servicesimpleui.yaml | 2 +- charts/hawkbit/values.yaml | 11 ++++---- 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/charts/hawkbit/templates/ingress.yaml b/charts/hawkbit/templates/ingress.yaml index d024cc1c..12164453 100644 --- a/charts/hawkbit/templates/ingress.yaml +++ b/charts/hawkbit/templates/ingress.yaml @@ -26,7 +26,7 @@ spec: ingressClassName: {{ .Values.ingress.ingressClassName }} {{- end }} rules: - {{- range .Values.ingress.hosts }} + {{- range .Values.ingress.hosts_hawkbit }} - host: {{ .host | quote }} http: paths: @@ -36,12 +36,32 @@ spec: pathType: Prefix backend: service: - name: {{ $fullName }} + name: hawkbit port: name: http {{- else }} backend: - serviceName: {{ $fullName }} + serviceName: hawkbit + servicePort: http + {{- end }} + {{- end }} + {{- end }} + {{- range .Values.ingress.hosts_hawkbit_simple_ui }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ . }} + {{- if eq $apiVersion "networking.k8s.io/v1" }} + pathType: Prefix + backend: + service: + name: hawkbit-simple-ui-deployement + port: + name: http + {{- else }} + backend: + serviceName: hawkbit-simple-ui-deployement servicePort: http {{- end }} {{- end }} diff --git a/charts/hawkbit/templates/servicesimpleui.yaml b/charts/hawkbit/templates/servicesimpleui.yaml index e9e9df9b..17da052d 100644 --- a/charts/hawkbit/templates/servicesimpleui.yaml +++ b/charts/hawkbit/templates/servicesimpleui.yaml @@ -1,7 +1,7 @@ apiVersion: v1 kind: Service metadata: - name: "{{ include "hawkbit.fullname" . }}-simple-ui-service" + name: "{{ include "hawkbit.fullname" . }}-simple-ui" labels: app.kubernetes.io/name: "{{ include "hawkbit.name" . }}-simple-ui" {{- with .Values.serviceSimpleUI.annotations }} diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index 6c21088d..1b095eb2 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -67,17 +67,18 @@ readinessProbe: timeoutSeconds: 5 ingress: - enabled: false + enabled: true ingressClassName: annotations: {} # ingress.kubernetes.io/ssl-redirect: "true" # kubernetes.io/tls-acme: "true" ## ingress service multiple host so has to have api on https://hawkbit.sbx.agreg.io/ and ui on https://hawkbit-simple-ui.sbx.agreg.io/ - hosts: - - host: hawkbit.local - paths: [] + hosts_hawkbit: + - host: hawkbit + paths: [ / ] + hosts_hawkbit_simple_ui: - host: hawkbit-simple-ui - paths: [] + paths: [ / ] tls: [] # - secretName: hawkbit-tls # hosts: From 325fd51d3f4c3ce2eab962acc6d76f24cded7ba0 Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Fri, 6 Jun 2025 18:49:20 +0200 Subject: [PATCH 14/24] connect correcly ingress and service --- charts/hawkbit/templates/ingress.yaml | 16 +++++++++------- charts/hawkbit/templates/service.yaml | 4 ++-- charts/hawkbit/templates/servicesimpleui.yaml | 4 ++-- charts/hawkbit/values.yaml | 8 ++++++-- 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/charts/hawkbit/templates/ingress.yaml b/charts/hawkbit/templates/ingress.yaml index 12164453..72ee3f51 100644 --- a/charts/hawkbit/templates/ingress.yaml +++ b/charts/hawkbit/templates/ingress.yaml @@ -1,6 +1,8 @@ {{- if .Values.ingress.enabled -}} {{- $apiVersion := include "hawkbit.ingressAPIVersion" . -}} {{- $fullName := include "hawkbit.fullname" . -}} +{{- $hostsHawkbitSimpleUIport := .Values.ingress.hosts_hawkbit_simple_ui.port -}} +{{- $hostsHawkbitPort := .Values.ingress.hosts_hawkbit.port -}} apiVersion: {{ $apiVersion }} kind: Ingress metadata: @@ -26,7 +28,7 @@ spec: ingressClassName: {{ .Values.ingress.ingressClassName }} {{- end }} rules: - {{- range .Values.ingress.hosts_hawkbit }} + {{- range .Values.ingress.hosts_hawkbit.hosts }} - host: {{ .host | quote }} http: paths: @@ -42,11 +44,11 @@ spec: {{- else }} backend: serviceName: hawkbit - servicePort: http + servicePort: {{ $hostsHawkbitPort }} {{- end }} {{- end }} {{- end }} - {{- range .Values.ingress.hosts_hawkbit_simple_ui }} + {{- range .Values.ingress.hosts_hawkbit_simple_ui.hosts }} - host: {{ .host | quote }} http: paths: @@ -56,13 +58,13 @@ spec: pathType: Prefix backend: service: - name: hawkbit-simple-ui-deployement + name: hawkbit-simple-ui port: - name: http + name: http-simple-ui {{- else }} backend: - serviceName: hawkbit-simple-ui-deployement - servicePort: http + serviceName: hawkbit-simple-ui + servicePort: {{ $hostsHawkbitSimpleUIport }} {{- end }} {{- end }} {{- end }} diff --git a/charts/hawkbit/templates/service.yaml b/charts/hawkbit/templates/service.yaml index db234663..5cef3fa6 100644 --- a/charts/hawkbit/templates/service.yaml +++ b/charts/hawkbit/templates/service.yaml @@ -11,8 +11,8 @@ metadata: spec: type: {{ .Values.service.type }} ports: - - port: {{ .Values.service.port }} - targetPort: http + - port: {{ .Values.ingress.hosts_hawkbit.port }} #port expose pour ingress + targetPort: {{ .Values.service.port }} ## port of the pod/deployement protocol: TCP name: http selector: diff --git a/charts/hawkbit/templates/servicesimpleui.yaml b/charts/hawkbit/templates/servicesimpleui.yaml index 17da052d..2a6aba10 100644 --- a/charts/hawkbit/templates/servicesimpleui.yaml +++ b/charts/hawkbit/templates/servicesimpleui.yaml @@ -11,8 +11,8 @@ metadata: spec: type: {{ .Values.serviceSimpleUI.type }} ports: - - port: {{ .Values.serviceSimpleUI.port }} - targetPort: http-simple-ui + - port: {{ .Values.ingress.hosts_hawkbit_simple_ui.port }} #port expose pour ingress + targetPort: {{ .Values.serviceSimpleUI.port }} ## port of the pod/deployement protocol: TCP name: http-simple-ui selector: diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index 1b095eb2..5bab6f6e 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -50,13 +50,13 @@ fullnameOverride: "" service: type: ClusterIP - port: 8080 + port: 8080 ## port of the container annotations: {} # traefik.ingress.kubernetes.io/affinity: "true" serviceSimpleUI: type: ClusterIP - port: 8088 + port: 8088 ## port of the container annotations: {} livenessProbe: @@ -74,9 +74,13 @@ ingress: # kubernetes.io/tls-acme: "true" ## ingress service multiple host so has to have api on https://hawkbit.sbx.agreg.io/ and ui on https://hawkbit-simple-ui.sbx.agreg.io/ hosts_hawkbit: + port : 8080 ## port exposed by ingress or internal + hosts: - host: hawkbit paths: [ / ] hosts_hawkbit_simple_ui: + port : 8088 ## port exposed by ingress or internal + hosts : - host: hawkbit-simple-ui paths: [ / ] tls: [] From f07d536ed9b9c38841affe4a7613ca334311f7dd Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Mon, 9 Jun 2025 15:48:48 +0200 Subject: [PATCH 15/24] dev: fix link between service and deployement by using common label instance --- charts/hawkbit/templates/deployment-simple-ui.yaml | 4 ++-- charts/hawkbit/templates/servicesimpleui.yaml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/charts/hawkbit/templates/deployment-simple-ui.yaml b/charts/hawkbit/templates/deployment-simple-ui.yaml index fdd7820e..ccdfde0b 100644 --- a/charts/hawkbit/templates/deployment-simple-ui.yaml +++ b/charts/hawkbit/templates/deployment-simple-ui.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: "{{ include "hawkbit.fullname" . }}-simple-ui-deployement" + name: "{{ include "hawkbit.fullname" . }}-simple-ui" labels: app.kubernetes.io/name: "{{ include "hawkbit.name" . }}-simple-ui" spec: @@ -30,7 +30,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} containers: - - name: {{ .Chart.Name }} + - name: "{{ .Chart.Name }}-simple-ui" image: "{{ .Values.imageSimpleUI.repository }}:{{ .Values.imageSimpleUI.tag }}" imagePullPolicy: {{ .Values.imageSimpleUI.pullPolicy }} env: diff --git a/charts/hawkbit/templates/servicesimpleui.yaml b/charts/hawkbit/templates/servicesimpleui.yaml index 2a6aba10..c5288133 100644 --- a/charts/hawkbit/templates/servicesimpleui.yaml +++ b/charts/hawkbit/templates/servicesimpleui.yaml @@ -4,6 +4,7 @@ metadata: name: "{{ include "hawkbit.fullname" . }}-simple-ui" labels: app.kubernetes.io/name: "{{ include "hawkbit.name" . }}-simple-ui" + app.kubernetes.io/instance: {{ .Release.Name }} {{- with .Values.serviceSimpleUI.annotations }} annotations: {{- toYaml . | nindent 4 }} @@ -17,4 +18,4 @@ spec: name: http-simple-ui selector: app.kubernetes.io/name: "{{ include "hawkbit.name" . }}-simple-ui" - app.kubernetes.io/instance: "{{ .Release.Name }}-simple-ui" + app.kubernetes.io/instance: {{ .Release.Name }} From a2e2f1d9cc2992d8fdea012526baaf735698d08c Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Fri, 13 Jun 2025 14:36:34 +0200 Subject: [PATCH 16/24] add flag to ingress --- charts/hawkbit/templates/ingress.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/charts/hawkbit/templates/ingress.yaml b/charts/hawkbit/templates/ingress.yaml index 72ee3f51..b37127d8 100644 --- a/charts/hawkbit/templates/ingress.yaml +++ b/charts/hawkbit/templates/ingress.yaml @@ -8,6 +8,7 @@ kind: Ingress metadata: name: {{ $fullName }} labels: + app.kubernetes.io/instance: {{ .Release.Name }} {{ include "hawkbit.labels" . | indent 4 }} {{- with .Values.ingress.annotations }} annotations: From 281fd58efd8ce8b2cf97eca6209ba7eaf03402d9 Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Thu, 19 Jun 2025 15:40:55 +0200 Subject: [PATCH 17/24] dev: update version --- charts/hawkbit/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/hawkbit/Chart.yaml b/charts/hawkbit/Chart.yaml index 42dda3a6..117610f1 100644 --- a/charts/hawkbit/Chart.yaml +++ b/charts/hawkbit/Chart.yaml @@ -10,7 +10,7 @@ # SPDX-License-Identifier: EPL-2.0 --- apiVersion: v2 -version: 1.7.0 +version: 2.0.0 appVersion: "0.8.0" description: | Eclipse hawkBit™ is a domain independent back-end framework for rolling out software updates From fa58f9bc0ab94326c381494cefbb38671820455c Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Fri, 20 Jun 2025 12:21:08 +0200 Subject: [PATCH 18/24] dev: set correct address --- charts/hawkbit/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index 5bab6f6e..ff578348 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -109,7 +109,7 @@ env: springRabbitmqPassword: "guest" envSimpleUI: - springAppJson: {"hawkbit.server.mgmtUrl": "http://hawkbit:8080"} + springAppJson: {"hawkbit.server.mgmtUrl": "http://hawkbit-server:8080"} # optional env vars extraEnv: {} From bc5e814c92e13e6a914b9690cae412125ae7853f Mon Sep 17 00:00:00 2001 From: Aurelia Crepin Date: Fri, 20 Jun 2025 12:22:04 +0200 Subject: [PATCH 19/24] dev: refacto format ingress to correspond to our private ingress and work as old hawkbit --- charts/hawkbit/templates/ingress.yaml | 30 ++++----------------------- charts/hawkbit/values.yaml | 14 ++++++------- 2 files changed, 11 insertions(+), 33 deletions(-) diff --git a/charts/hawkbit/templates/ingress.yaml b/charts/hawkbit/templates/ingress.yaml index b37127d8..e97a0d59 100644 --- a/charts/hawkbit/templates/ingress.yaml +++ b/charts/hawkbit/templates/ingress.yaml @@ -33,40 +33,18 @@ spec: - host: {{ .host | quote }} http: paths: - {{- range .paths }} - - path: {{ . }} + - path: {{ .paths }} {{- if eq $apiVersion "networking.k8s.io/v1" }} pathType: Prefix backend: service: - name: hawkbit + name: {{ .service }} port: - name: http + number: {{ .port }} {{- else }} backend: - serviceName: hawkbit + serviceName: {{ include "hawkbit.fullname" . }} servicePort: {{ $hostsHawkbitPort }} {{- end }} - {{- end }} - {{- end }} - {{- range .Values.ingress.hosts_hawkbit_simple_ui.hosts }} - - host: {{ .host | quote }} - http: - paths: - {{- range .paths }} - - path: {{ . }} - {{- if eq $apiVersion "networking.k8s.io/v1" }} - pathType: Prefix - backend: - service: - name: hawkbit-simple-ui - port: - name: http-simple-ui - {{- else }} - backend: - serviceName: hawkbit-simple-ui - servicePort: {{ $hostsHawkbitSimpleUIport }} - {{- end }} - {{- end }} {{- end }} {{- end }} diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index ff578348..20589829 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -67,22 +67,22 @@ readinessProbe: timeoutSeconds: 5 ingress: - enabled: true + enabled: false ingressClassName: annotations: {} # ingress.kubernetes.io/ssl-redirect: "true" # kubernetes.io/tls-acme: "true" ## ingress service multiple host so has to have api on https://hawkbit.sbx.agreg.io/ and ui on https://hawkbit-simple-ui.sbx.agreg.io/ hosts_hawkbit: - port : 8080 ## port exposed by ingress or internal hosts: - host: hawkbit - paths: [ / ] - hosts_hawkbit_simple_ui: - port : 8088 ## port exposed by ingress or internal - hosts : + path: "/" + port : 8080 ## port exposed by ingress or internal + service: hawkbit - host: hawkbit-simple-ui - paths: [ / ] + path: "/" + port : 8088 ## port exposed by ingress or internal + service: hawkbit-simple-ui tls: [] # - secretName: hawkbit-tls # hosts: From f8b442978240bbaee178b9d6af81d8eb4ab64100 Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Wed, 25 Jun 2025 09:27:07 +0200 Subject: [PATCH 20/24] refacto: improve retrocompatibility --- charts/hawkbit/templates/_helpers.tpl | 11 +++++ .../templates/deployment-simple-ui.yaml | 23 ++++----- charts/hawkbit/templates/deployment.yaml | 6 +-- charts/hawkbit/templates/ingress.yaml | 16 +++---- charts/hawkbit/templates/service.yaml | 4 +- charts/hawkbit/templates/servicesimpleui.yaml | 6 +-- charts/hawkbit/values.yaml | 48 +++++++++---------- 7 files changed, 62 insertions(+), 52 deletions(-) diff --git a/charts/hawkbit/templates/_helpers.tpl b/charts/hawkbit/templates/_helpers.tpl index a097f0e4..9a1dff73 100644 --- a/charts/hawkbit/templates/_helpers.tpl +++ b/charts/hawkbit/templates/_helpers.tpl @@ -54,3 +54,14 @@ Return the appropriate apiVersion for ingress. {{- print "networking.k8s.io/v1beta1" -}} {{- end -}} {{- end -}} + +{{- define "hawkbit.ingressDefaultPaths" -}} +- path: "/rest" + service: {{ include "hawkbit.fullname" . }} +- path: "/swagger-ui" + service: {{ include "hawkbit.fullname" . }} +- path: "/v3" + service: {{ include "hawkbit.fullname" . }} +- path: "/" + service: {{ include "hawkbit.fullname" . }}-simple-ui +{{- end -}} \ No newline at end of file diff --git a/charts/hawkbit/templates/deployment-simple-ui.yaml b/charts/hawkbit/templates/deployment-simple-ui.yaml index ccdfde0b..43e20b8a 100644 --- a/charts/hawkbit/templates/deployment-simple-ui.yaml +++ b/charts/hawkbit/templates/deployment-simple-ui.yaml @@ -1,3 +1,4 @@ +{{- $hawkbit_service_name := include "hawkbit.fullname" . -}} apiVersion: apps/v1 kind: Deployment metadata: @@ -5,9 +6,9 @@ metadata: labels: app.kubernetes.io/name: "{{ include "hawkbit.name" . }}-simple-ui" spec: - replicas: {{ .Values.replicaCount }} + replicas: {{ .Values.serviceSimpleUI.replicaCount }} strategy: - {{- with .Values.updateStrategy }} + {{- with .Values.serviceSimpleUI.updateStrategy }} {{- toYaml . | nindent 4 }} {{- end }} selector: @@ -34,26 +35,26 @@ spec: image: "{{ .Values.imageSimpleUI.repository }}:{{ .Values.imageSimpleUI.tag }}" imagePullPolicy: {{ .Values.imageSimpleUI.pullPolicy }} env: - - name: SPRING_APPLICATION_JSON - value: {{ .Values.envSimpleUI.springAppJson | toJson | quote }} + - name: HAWKBIT_SERVER_MGMTURL + value: {{ .Values.envSimpleUI.hawkbitServerMgmtUrl | default (printf "http://%s:%v" $hawkbit_service_name $.Values.service.port ) }} ports: - - name: http-simple-ui - containerPort: {{ .Values.serviceSimpleUI.port }} + - name: http + containerPort: 8088 protocol: TCP livenessProbe: httpGet: path: /login - port: http-simple-ui + port: http initialDelaySeconds: {{ .Values.livenessProbe.initialDelaySeconds }} timeoutSeconds: {{ .Values.livenessProbe.timeoutSeconds }} readinessProbe: httpGet: path: /login - port: http-simple-ui + port: http initialDelaySeconds: {{ .Values.readinessProbe.initialDelaySeconds }} timeoutSeconds: {{ .Values.readinessProbe.timeoutSeconds }} resources: -{{ toYaml .Values.resources | indent 12 }} +{{ toYaml .Values.serviceSimpleUI.resources | indent 12 }} {{- with .Values.nodeSelector }} nodeSelector: {{- toYaml . | nindent 8 }} @@ -72,5 +73,5 @@ spec: runAsUser: {{ .Values.securityContext.runAsUser }} {{- if .Values.securityContext.extra }} {{- toYaml .Values.securityContext.extra | nindent 8 }} - {{- end }} - {{- end }} \ No newline at end of file + {{- end }} + {{- end }} diff --git a/charts/hawkbit/templates/deployment.yaml b/charts/hawkbit/templates/deployment.yaml index 1d3066f5..c6db6f5e 100644 --- a/charts/hawkbit/templates/deployment.yaml +++ b/charts/hawkbit/templates/deployment.yaml @@ -7,7 +7,7 @@ metadata: spec: replicas: {{ .Values.replicaCount }} strategy: - {{- with .Values.updateStrategy }} + {{- with .Values.service.updateStrategy }} {{- toYaml . | nindent 4 }} {{- end }} selector: @@ -42,7 +42,7 @@ spec: {{- else }} value: "jdbc:mariadb://{{ if .Values.mysql.enabled }}{{ .Release.Name }}-mysql{{ else }}{{ .Values.env.springDatasourceHost }}{{ end }}:3306/{{ .Values.env.springDatasourceDb }}" {{- end }} - - name: "SPRING_APPLICATION_JSON" ## secret incluing the env SPRING_DATASOURCE_USERNAME TO TEST + - name: "SPRING_APPLICATION_JSON" valueFrom: secretKeyRef: name: {{ include "hawkbit.fullname" . }} @@ -66,7 +66,7 @@ spec: {{- end }} ports: - name: http - containerPort: {{ .Values.service.port }} + containerPort: 8080 protocol: TCP livenessProbe: httpGet: diff --git a/charts/hawkbit/templates/ingress.yaml b/charts/hawkbit/templates/ingress.yaml index e97a0d59..1aebed76 100644 --- a/charts/hawkbit/templates/ingress.yaml +++ b/charts/hawkbit/templates/ingress.yaml @@ -1,14 +1,12 @@ {{- if .Values.ingress.enabled -}} +{{- $ingressDefaultPaths := (include "hawkbit.ingressDefaultPaths" $ | fromYamlArray ) }} {{- $apiVersion := include "hawkbit.ingressAPIVersion" . -}} {{- $fullName := include "hawkbit.fullname" . -}} -{{- $hostsHawkbitSimpleUIport := .Values.ingress.hosts_hawkbit_simple_ui.port -}} -{{- $hostsHawkbitPort := .Values.ingress.hosts_hawkbit.port -}} apiVersion: {{ $apiVersion }} kind: Ingress metadata: name: {{ $fullName }} labels: - app.kubernetes.io/instance: {{ .Release.Name }} {{ include "hawkbit.labels" . | indent 4 }} {{- with .Values.ingress.annotations }} annotations: @@ -29,22 +27,24 @@ spec: ingressClassName: {{ .Values.ingress.ingressClassName }} {{- end }} rules: - {{- range .Values.ingress.hosts_hawkbit.hosts }} + {{- range .Values.ingress.hosts }} - host: {{ .host | quote }} http: paths: - - path: {{ .paths }} + {{- range default .paths $ingressDefaultPaths }} + - path: {{ .path }} {{- if eq $apiVersion "networking.k8s.io/v1" }} pathType: Prefix backend: service: name: {{ .service }} port: - number: {{ .port }} + name: http {{- else }} backend: - serviceName: {{ include "hawkbit.fullname" . }} - servicePort: {{ $hostsHawkbitPort }} + serviceName: {{ .service }} + servicePort: http {{- end }} + {{- end }} {{- end }} {{- end }} diff --git a/charts/hawkbit/templates/service.yaml b/charts/hawkbit/templates/service.yaml index 5cef3fa6..db234663 100644 --- a/charts/hawkbit/templates/service.yaml +++ b/charts/hawkbit/templates/service.yaml @@ -11,8 +11,8 @@ metadata: spec: type: {{ .Values.service.type }} ports: - - port: {{ .Values.ingress.hosts_hawkbit.port }} #port expose pour ingress - targetPort: {{ .Values.service.port }} ## port of the pod/deployement + - port: {{ .Values.service.port }} + targetPort: http protocol: TCP name: http selector: diff --git a/charts/hawkbit/templates/servicesimpleui.yaml b/charts/hawkbit/templates/servicesimpleui.yaml index c5288133..c4f20a1b 100644 --- a/charts/hawkbit/templates/servicesimpleui.yaml +++ b/charts/hawkbit/templates/servicesimpleui.yaml @@ -12,10 +12,10 @@ metadata: spec: type: {{ .Values.serviceSimpleUI.type }} ports: - - port: {{ .Values.ingress.hosts_hawkbit_simple_ui.port }} #port expose pour ingress - targetPort: {{ .Values.serviceSimpleUI.port }} ## port of the pod/deployement + - port: {{ .Values.serviceSimpleUI.port }} + targetPort: http protocol: TCP - name: http-simple-ui + name: http selector: app.kubernetes.io/name: "{{ include "hawkbit.name" . }}-simple-ui" app.kubernetes.io/instance: {{ .Release.Name }} diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index 20589829..b412bf7a 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -23,7 +23,6 @@ imageSimpleUI: tag: "0.8.0" pullPolicy: IfNotPresent -replicaCount: 1 ## podDisruptionBudget configuration podDisruptionBudget: @@ -39,25 +38,30 @@ securityContext: runAsUser: 65534 extra: {} -## strategy used to replace old Pods by new ones -## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy -updateStrategy: - ## default is re-create, because of possible database migrations - type: Recreate nameOverride: "" fullnameOverride: "" service: type: ClusterIP - port: 8080 ## port of the container + port: 8080 annotations: {} + replicaCount: 1 + ## strategy used to replace old Pods by new ones + ## ref: https://kubernetes.io/docs/concepts/workloads/controllers/deployment/#strategy + updateStrategy: + ## default is re-create, because of possible database migrations + type: Recreate # traefik.ingress.kubernetes.io/affinity: "true" serviceSimpleUI: type: ClusterIP - port: 8088 ## port of the container + port: 8088 annotations: {} + replicaCount: 1 + updateStrategy: + type: RollingUpdate + resources: {} livenessProbe: initialDelaySeconds: 240 @@ -72,17 +76,11 @@ ingress: annotations: {} # ingress.kubernetes.io/ssl-redirect: "true" # kubernetes.io/tls-acme: "true" - ## ingress service multiple host so has to have api on https://hawkbit.sbx.agreg.io/ and ui on https://hawkbit-simple-ui.sbx.agreg.io/ - hosts_hawkbit: - hosts: - - host: hawkbit - path: "/" - port : 8080 ## port exposed by ingress or internal - service: hawkbit - - host: hawkbit-simple-ui - path: "/" - port : 8088 ## port exposed by ingress or internal - service: hawkbit-simple-ui + hosts: + - host: hawkbit.local + # paths: + # - path: "/" + # service: "hawkbit" tls: [] # - secretName: hawkbit-tls # hosts: @@ -103,13 +101,13 @@ env: springDatasourceHost: "hawkbit-mysql" springDatasourceDb: "hawkbit" # if springDatasourceUrl is set override default mysql db url - springDatasourceUrl: "jdbc:mariadb://mysql:3306/hawkbit" - springRabbitmqHost: "rabbitmq" - springRabbitmqUsername: "guest" - springRabbitmqPassword: "guest" + springDatasourceUrl: "" + springRabbitmqHost: "hawkbit-rabbitmq" + springRabbitmqUsername: "hawkbit" + springRabbitmqPassword: "hawkbit" envSimpleUI: - springAppJson: {"hawkbit.server.mgmtUrl": "http://hawkbit-server:8080"} + hawkbitServerMgmtUrl: "" # optional env vars extraEnv: {} @@ -189,7 +187,7 @@ config: # the "{noop}" prefix is needed! password: "{noop}admin" datasource: - username: root + username: hawkbit password: hawkbit From a2787a9e9924736b980251823027ab30a7d631fb Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Tue, 1 Jul 2025 09:18:17 +0200 Subject: [PATCH 21/24] chore: respect convetional format --- charts/hawkbit/templates/deployment-simple-ui.yaml | 6 +++--- charts/hawkbit/values.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/charts/hawkbit/templates/deployment-simple-ui.yaml b/charts/hawkbit/templates/deployment-simple-ui.yaml index 43e20b8a..bc94e48a 100644 --- a/charts/hawkbit/templates/deployment-simple-ui.yaml +++ b/charts/hawkbit/templates/deployment-simple-ui.yaml @@ -26,14 +26,14 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} spec: - {{- with .Values.imageSimpleUI.pullSecrets }} + {{- with .Values.simpleUIImage.pullSecrets }} imagePullSecrets: {{- toYaml . | nindent 8 }} {{- end }} containers: - name: "{{ .Chart.Name }}-simple-ui" - image: "{{ .Values.imageSimpleUI.repository }}:{{ .Values.imageSimpleUI.tag }}" - imagePullPolicy: {{ .Values.imageSimpleUI.pullPolicy }} + image: "{{ .Values.simpleUIImage.repository }}:{{ .Values.simpleUIImage.tag }}" + imagePullPolicy: {{ .Values.simpleUIImage.pullPolicy }} env: - name: HAWKBIT_SERVER_MGMTURL value: {{ .Values.envSimpleUI.hawkbitServerMgmtUrl | default (printf "http://%s:%v" $hawkbit_service_name $.Values.service.port ) }} diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index b412bf7a..3eeb9648 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -18,7 +18,7 @@ image: tag: "0.8.0" pullPolicy: IfNotPresent -imageSimpleUI: +simpleUIImage: repository: "hawkbit/hawkbit-simple-ui" tag: "0.8.0" pullPolicy: IfNotPresent From 348b322e92c140a1825a1c1afc006044df472b2d Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Tue, 8 Jul 2025 17:07:29 +0200 Subject: [PATCH 22/24] docs: add path default value --- charts/hawkbit/values.yaml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index 3eeb9648..d2e85e85 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -78,9 +78,16 @@ ingress: # kubernetes.io/tls-acme: "true" hosts: - host: hawkbit.local - # paths: - # - path: "/" - # service: "hawkbit" + paths: + # default value: + # - path: "/rest" + # service: {{ include "hawkbit.fullname" . }} + # - path: "/swagger-ui" + # service: {{ include "hawkbit.fullname" . }} + # - path: "/v3" + # service: {{ include "hawkbit.fullname" . }} + #² - path: "/" + # service: {{ include "hawkbit.fullname" . }}-simple-ui tls: [] # - secretName: hawkbit-tls # hosts: From 0bd48f68b069e78e2692135204561e4187d10a1a Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Mon, 25 Aug 2025 18:16:38 +0200 Subject: [PATCH 23/24] feat: add config for simpleUI --- charts/hawkbit/templates/deployment-simple-ui.yaml | 5 +++++ charts/hawkbit/templates/secrets.yaml | 1 + charts/hawkbit/values.yaml | 1 + 3 files changed, 7 insertions(+) diff --git a/charts/hawkbit/templates/deployment-simple-ui.yaml b/charts/hawkbit/templates/deployment-simple-ui.yaml index bc94e48a..d32b69f2 100644 --- a/charts/hawkbit/templates/deployment-simple-ui.yaml +++ b/charts/hawkbit/templates/deployment-simple-ui.yaml @@ -37,6 +37,11 @@ spec: env: - name: HAWKBIT_SERVER_MGMTURL value: {{ .Values.envSimpleUI.hawkbitServerMgmtUrl | default (printf "http://%s:%v" $hawkbit_service_name $.Values.service.port ) }} + - name: "SPRING_APPLICATION_JSON" + valueFrom: + secretKeyRef: + name: {{ include "hawkbit.fullname" . }} + key: SIMPLE_UI_SPRING_APPLICATION_JSON ports: - name: http containerPort: 8088 diff --git a/charts/hawkbit/templates/secrets.yaml b/charts/hawkbit/templates/secrets.yaml index 2def1c4a..8fc7b54b 100644 --- a/charts/hawkbit/templates/secrets.yaml +++ b/charts/hawkbit/templates/secrets.yaml @@ -7,6 +7,7 @@ metadata: type: Opaque data: SPRING_APPLICATION_JSON: {{ .Values.config.secrets | toJson | b64enc }} + SIMPLE_UI_SPRING_APPLICATION_JSON: {{ .Values.config.simpleUI | toJson | b64enc }} --- apiVersion: v1 kind: Secret diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index d2e85e85..3ee236a1 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -196,6 +196,7 @@ config: datasource: username: hawkbit password: hawkbit + simpleUI: {} ## dependency charts config From 01b09ba677b690be66859801160022e5d69ef842 Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Mon, 15 Sep 2025 17:06:48 +0200 Subject: [PATCH 24/24] chore: don't wiat 2 minutes before readinessProbe: --- charts/hawkbit/values.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/charts/hawkbit/values.yaml b/charts/hawkbit/values.yaml index 3ee236a1..645de2ef 100644 --- a/charts/hawkbit/values.yaml +++ b/charts/hawkbit/values.yaml @@ -67,8 +67,9 @@ livenessProbe: initialDelaySeconds: 240 timeoutSeconds: 5 readinessProbe: - initialDelaySeconds: 120 + failureThreshold: 24 timeoutSeconds: 5 + periodSeconds: 5 ingress: enabled: false