Skip to content

Commit

Permalink
service
Browse files Browse the repository at this point in the history
Signed-off-by: Icarus9913 <icaruswu66@qq.com>
  • Loading branch information
Icarus9913 committed Aug 2, 2023
1 parent ccf1f72 commit 26d4a10
Show file tree
Hide file tree
Showing 25 changed files with 201 additions and 504 deletions.
3 changes: 2 additions & 1 deletion charts/crds/kdoctor.io_apphttphealthies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,8 @@ spec:
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
terminationGracePeriodSeconds:
terminationGracePeriodMinutes:
default: 60
format: int64
type: integer
required:
Expand Down
3 changes: 2 additions & 1 deletion charts/crds/kdoctor.io_netdnses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,8 @@ spec:
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
terminationGracePeriodSeconds:
terminationGracePeriodMinutes:
default: 60
format: int64
type: integer
required:
Expand Down
3 changes: 2 additions & 1 deletion charts/crds/kdoctor.io_netreaches.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1105,7 +1105,8 @@ spec:
to an implementation-defined value. More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/'
type: object
type: object
terminationGracePeriodSeconds:
terminationGracePeriodMinutes:
default: 60
format: int64
type: integer
required:
Expand Down
15 changes: 1 addition & 14 deletions charts/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,4 @@ data:
agentDaemonsetName: {{ .Values.kdoctorAgent.name | trunc 63 | trimSuffix "-" }}
agentIngressName: {{ include "project.kdoctorAgent.ingressName" . }}
kdoctorAgent:
containerCommand: {{ .Values.kdoctorAgent.cmdBinName }}
imageConfig:
agentImage: {{ include "project.kdoctorAgent.image" . | quote }}
pullPolicy: {{ .Values.kdoctorAgent.image.pullPolicy }}
serviceAccountName: {{ .Values.kdoctorAgent.name | trunc 63 | trimSuffix "-" }}
{{- with .Values.kdoctorAgent.httpServer }}
httpServer:
{{- toYaml . | trim | nindent 8 }}
{{- end }}
reportHostPath: {{ .Values.kdoctorAgent.reportHostPath }}
configMapName: {{ .Values.global.configName }}
tlsSecretName: {{ .Values.tls.ca.secretName }}
labels:
{{- include "project.kdoctorAgent.labels" . | nindent 8 }}
uniqueMatchLabelKey: {{ .Values.kdoctorAgent.uniqueMatchLabelKey }}
235 changes: 0 additions & 235 deletions charts/templates/daemonset.yaml

This file was deleted.

92 changes: 0 additions & 92 deletions charts/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -1,95 +1,3 @@
{{- if .Values.feature.enableIPv4 }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "project.kdoctorAgent.serviceIpv4Name" . }}
namespace: {{ .Release.Namespace | quote }}
{{- if or .Values.global.commonAnnotations .Values.kdoctorAgent.service.annotations }}
annotations:
{{- if .Values.global.commonAnnotations }}
{{- include "tplvalues.render" ( dict "value" .Values.global.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.kdoctorAgent.service.annotations }}
{{- include "tplvalues.render" ( dict "value" .Values.kdoctorAgent.service.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
labels:
{{- if .Values.global.commonLabels }}
{{- include "tplvalues.render" ( dict "value" .Values.global.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- include "project.kdoctorAgent.labels" . | nindent 4 }}
spec:
type: {{ .Values.kdoctorAgent.service.type }}
ports:
{{- if .Values.kdoctorAgent.prometheus.enabled }}
- name: metrics
port: {{ .Values.kdoctorAgent.prometheus.port }}
targetPort: metrics
protocol: TCP
{{- end }}
{{- if .Values.feature.enableIPv4 }}
- name: http
port: {{ .Values.kdoctorAgent.httpServer.appHttpPort }}
targetPort: http
protocol: TCP
- name: https
port: {{ .Values.kdoctorAgent.httpServer.appHttpsPort }}
targetPort: https
protocol: TCP
{{- end }}
ipFamilyPolicy: SingleStack
ipFamilies:
- IPv4
selector:
{{- include "project.kdoctorAgent.selectorLabels" . | nindent 4 }}
{{- end }}
---
{{- if .Values.feature.enableIPv6 }}
apiVersion: v1
kind: Service
metadata:
name: {{ include "project.kdoctorAgent.serviceIpv6Name" . }}
namespace: {{ .Release.Namespace | quote }}
{{- if or .Values.global.commonAnnotations .Values.kdoctorAgent.service.annotations }}
annotations:
{{- if .Values.global.commonAnnotations }}
{{- include "tplvalues.render" ( dict "value" .Values.global.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.kdoctorAgent.service.annotations }}
{{- include "tplvalues.render" ( dict "value" .Values.kdoctorAgent.service.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- end }}
labels:
{{- if .Values.global.commonLabels }}
{{- include "tplvalues.render" ( dict "value" .Values.global.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- include "project.kdoctorAgent.labels" . | nindent 4 }}
spec:
type: {{ .Values.kdoctorAgent.service.type }}
ports:
{{- if .Values.kdoctorAgent.prometheus.enabled }}
- name: metrics
port: {{ .Values.kdoctorAgent.prometheus.port }}
targetPort: metrics
protocol: TCP
{{- end }}
{{- if .Values.feature.enableIPv6 }}
- name: http
port: {{ .Values.kdoctorAgent.httpServer.appHttpPort }}
targetPort: http
protocol: TCP
- name: https
port: {{ .Values.kdoctorAgent.httpServer.appHttpsPort }}
targetPort: https
protocol: TCP
{{- end }}
ipFamilyPolicy: SingleStack
ipFamilies:
- IPv6
selector:
{{- include "project.kdoctorAgent.selectorLabels" . | nindent 4 }}
{{- end }}
---
apiVersion: v1
kind: Service
metadata:
Expand Down
3 changes: 3 additions & 0 deletions charts/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ feature:
## @section kdoctorAgent parameters
##
kdoctorAgent:
## @param kdoctorAgent.uniqueMatchLabelKey the unique match label key for Agent
uniqueMatchLabelKey: ""

## @param kdoctorAgent.name the kdoctorAgent name
name: "kdoctor-agent"

Expand Down
Loading

0 comments on commit 26d4a10

Please sign in to comment.