feat: enable apiServerService in Helm values and update service template

- Added `apiServerService` configuration to `values.prod.yaml` and `values.yaml`, enabling the service.
- Updated the service template to use the new `apiServerService` configuration instead of the deprecated `metrics` configuration.

Signed-off-by: zhenyus <zhenyus@mathmast.com>
This commit is contained in:
zhenyus 2025-08-18 12:16:59 +08:00
parent 4173dd0813
commit a68e0f3f6f
4 changed files with 11 additions and 13 deletions

View File

@ -1,17 +1,17 @@
{{- if .Values.metrics.enabled }} {{- if .Values.apiServerService.enabled }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ include "freeleaps-secret-operator.fullname" . }}-metrics name: {{ include "freeleaps-secret-operator.fullname" . }}-vault-service
labels: labels:
{{- include "freeleaps-secret-operator.labels" . | nindent 4 }} {{- include "freeleaps-secret-operator.labels" . | nindent 4 }}
spec: spec:
type: {{ .Values.metrics.service.type }} type: {{ .Values.apiServerService.service.type }}
ports: ports:
- port: {{ .Values.metrics.service.port }} - port: {{ .Values.apiServerService.service.port }}
targetPort: metrics targetPort: {{ .Values.operator.apiServerPort }}
protocol: TCP protocol: TCP
name: metrics name: api
selector: selector:
{{- include "freeleaps-secret-operator.selectorLabels" . | nindent 4 }} {{- include "freeleaps-secret-operator.selectorLabels" . | nindent 4 }}
{{- end }} {{- end }}

View File

@ -104,9 +104,8 @@ hmac:
crds: crds:
install: false # Set to false if you want to manage CRDs separately install: false # Set to false if you want to manage CRDs separately
# Metrics configuration apiServerService:
metrics: enabled: true
enabled: false
service: service:
type: ClusterIP type: ClusterIP
port: 8080 port: 8080

View File

@ -104,9 +104,8 @@ hmac:
crds: crds:
install: false # Set to false if you want to manage CRDs separately install: false # Set to false if you want to manage CRDs separately
# Metrics configuration apiServerService:
metrics: enabled: true
enabled: false
service: service:
type: ClusterIP type: ClusterIP
port: 8080 port: 8080

View File

@ -11,7 +11,7 @@ executeFreeleapsPipeline {
commitMessageLintEnabled = false commitMessageLintEnabled = false
components = [ components = [
[ [
name: 'secret-operator', name: 'secretOperator',
root: 'secretoperator', root: 'secretoperator',
language: 'python', language: 'python',
dependenciesManager: 'pip', dependenciesManager: 'pip',