fix(argo-cd): Consolidate and fix container ports (#1788)
Signed-off-by: Petr Drastil <petr.drastil@gmail.com>
This commit is contained in:
parent
e91bc78a4a
commit
58f587618f
13 changed files with 152 additions and 97 deletions
|
|
@ -88,6 +88,27 @@ REMOVED option applicationSet.args.debug - Use applicationSet.logLevel: debug
|
|||
{{- if .Values.applicationSet.args.enableLeaderElection }}
|
||||
REMOVED option applicationSet.args.enableLeaderElection - Value determined based on replicas
|
||||
{{- end }}
|
||||
{{- if .Values.controller.containerPort }}
|
||||
REMOVED option controller.containerPort - Use controller.containerPorts
|
||||
{{- end }}
|
||||
{{- if .Values.server.containerPort }}
|
||||
REMOVED option server.containerPort - Use server.containerPorts
|
||||
{{- end }}
|
||||
{{- if .Values.repoServer.containerPort }}
|
||||
REMOVED option repoServer.containerPort - Use repoServer.containerPorts
|
||||
{{- end }}
|
||||
{{- if .Values.applicationSet.args.metricsAddr }}
|
||||
REMOVED option applicationSet.args.metricsAddr - Use applicationSet.containerPorts
|
||||
{{- end }}
|
||||
{{- if .Values.applicationSet.args.probeBindAddr }}
|
||||
REMOVED option applicationSet.args.probeBindAddr - Use applicationSet.containerPorts
|
||||
{{- end }}
|
||||
{{- if .Values.redis.containerPort }}
|
||||
REMOVED option redis.containerPort - Use redis.containerPorts
|
||||
{{- end }}
|
||||
{{- if .Values.redis.metrics.containerPort }}
|
||||
REMOVED option redis.metrics.containerPort - Use redis.containerPorts
|
||||
{{- end }}
|
||||
|
||||
In order to access the server UI you have the following options:
|
||||
|
||||
|
|
|
|||
|
|
@ -44,6 +44,13 @@ spec:
|
|||
containers:
|
||||
- command:
|
||||
- argocd-application-controller
|
||||
- --metrics-port={{ .Values.controller.containerPorts.metrics }}
|
||||
{{- if .Values.controller.metrics.applicationLabels.enabled }}
|
||||
{{- range .Values.controller.metrics.applicationLabels.labels }}
|
||||
- --metrics-application-labels
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.controller.args.statusProcessors }}
|
||||
- --status-processors
|
||||
- {{ . | quote }}
|
||||
|
|
@ -76,12 +83,6 @@ spec:
|
|||
- --loglevel
|
||||
- {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.controller.metrics.applicationLabels.enabled }}
|
||||
{{- range .Values.controller.metrics.applicationLabels.labels }}
|
||||
- --metrics-application-labels
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- with .Values.controller.extraArgs }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
|
|
@ -232,7 +233,7 @@ spec:
|
|||
{{- end }}
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: {{ .Values.controller.containerPort }}
|
||||
containerPort: {{ .Values.controller.containerPorts.metrics }}
|
||||
protocol: TCP
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
|
|
|
|||
|
|
@ -51,10 +51,11 @@ spec:
|
|||
command:
|
||||
- entrypoint.sh
|
||||
- argocd-applicationset-controller
|
||||
- --metrics-addr=:{{ .Values.applicationSet.containerPorts.metrics }}
|
||||
- --probe-addr=:{{ .Values.applicationSet.containerPorts.probe }}
|
||||
- --webhook-addr=:{{ .Values.applicationSet.containerPorts.webhook }}
|
||||
- --argocd-repo-server={{ template "argo-cd.repoServer.fullname" . }}:{{ .Values.repoServer.service.port }}
|
||||
- --enable-leader-election={{ gt ( .Values.applicationSet.replicaCount | int64) 1 }}
|
||||
- --metrics-addr={{ .Values.applicationSet.args.metricsAddr }}
|
||||
- --probe-addr={{ .Values.applicationSet.args.probeBindAddr }}
|
||||
- --policy={{ .Values.applicationSet.args.policy }}
|
||||
- --dry-run={{ .Values.applicationSet.args.dryRun }}
|
||||
- --logformat
|
||||
|
|
@ -78,13 +79,13 @@ spec:
|
|||
{{- end }}
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: {{ (split ":" .Values.applicationSet.args.metricsAddr)._1 }}
|
||||
containerPort: {{ .Values.applicationSet.containerPorts.metrics }}
|
||||
protocol: TCP
|
||||
- name: probe
|
||||
containerPort: {{ (split ":" .Values.applicationSet.args.probeBindAddr)._1 }}
|
||||
containerPort: {{ .Values.applicationSet.containerPorts.probe }}
|
||||
protocol: TCP
|
||||
- name: webhook
|
||||
containerPort: 7000
|
||||
containerPort: {{ .Values.applicationSet.containerPorts.webhook }}
|
||||
protocol: TCP
|
||||
{{- if .Values.applicationSet.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ spec:
|
|||
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.notifications.image.imagePullPolicy }}
|
||||
command:
|
||||
- argocd-notifications
|
||||
- --metrics-port={{ .Values.notifications.containerPorts.metrics }}
|
||||
- --loglevel={{ default .Values.global.logging.level .Values.notifications.logLevel }}
|
||||
- --logformat={{ default .Values.global.logging.format .Values.notifications.logFormat }}
|
||||
- --metrics-port={{ .Values.notifications.metrics.port }}
|
||||
- --namespace={{ .Release.Namespace }}
|
||||
- --argocd-repo-server={{ template "argo-cd.repoServer.fullname" . }}:{{ .Values.repoServer.service.port }}
|
||||
{{- range .Values.notifications.extraArgs }}
|
||||
|
|
@ -66,7 +66,7 @@ spec:
|
|||
{{- end }}
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: {{ .Values.notifications.metrics.port }}
|
||||
containerPort: {{ .Values.notifications.containerPorts.metrics }}
|
||||
protocol: TCP
|
||||
resources:
|
||||
{{- toYaml .Values.notifications.resources | nindent 12 }}
|
||||
|
|
|
|||
|
|
@ -53,6 +53,8 @@ spec:
|
|||
- entrypoint.sh
|
||||
args:
|
||||
- argocd-repo-server
|
||||
- --port={{ .Values.repoServer.containerPorts.server }}
|
||||
- --metrics-port={{ .Values.repoServer.containerPorts.metrics }}
|
||||
{{- with .Values.repoServer.logFormat }}
|
||||
- --logformat
|
||||
- {{ . | quote }}
|
||||
|
|
@ -236,10 +238,10 @@ spec:
|
|||
name: tmp
|
||||
ports:
|
||||
- name: repo-server
|
||||
containerPort: {{ .Values.repoServer.containerPort }}
|
||||
containerPort: {{ .Values.repoServer.containerPorts.server }}
|
||||
protocol: TCP
|
||||
- name: metrics
|
||||
containerPort: 8084
|
||||
containerPort: {{ .Values.repoServer.containerPorts.metrics }}
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
|
|
|
|||
|
|
@ -12,11 +12,11 @@ spec:
|
|||
- name: {{ .Values.server.service.servicePortHttpName }}
|
||||
protocol: TCP
|
||||
port: {{ .Values.server.service.servicePortHttp }}
|
||||
targetPort: {{- if .Values.server.service.namedTargetPort }} {{ .Values.server.name }} {{- else }} {{ .Values.server.containerPort }} {{- end }}
|
||||
targetPort: server
|
||||
- name: {{ .Values.server.service.servicePortHttpsName }}
|
||||
protocol: TCP
|
||||
port: {{ .Values.server.service.servicePortHttps }}
|
||||
targetPort: {{- if .Values.server.service.namedTargetPort }} {{ .Values.server.name }} {{- else }} {{ .Values.server.containerPort }} {{- end }}
|
||||
targetPort: server
|
||||
selector:
|
||||
{{- include "argo-cd.selectorLabels" (dict "context" . "name" .Values.server.name) | nindent 4 }}
|
||||
sessionAffinity: None
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@ spec:
|
|||
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.server.image.imagePullPolicy }}
|
||||
command:
|
||||
- argocd-server
|
||||
- --port={{ .Values.server.containerPorts.server }}
|
||||
- --metrics-port={{ .Values.server.containerPorts.metrics }}
|
||||
{{- with .Values.server.logFormat }}
|
||||
- --logformat
|
||||
- {{ . | quote }}
|
||||
|
|
@ -287,16 +289,16 @@ spec:
|
|||
name: extensions
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: {{ .Values.server.name }}
|
||||
containerPort: {{ .Values.server.containerPort }}
|
||||
- name: server
|
||||
containerPort: {{ .Values.server.containerPorts.server }}
|
||||
protocol: TCP
|
||||
- name: metrics
|
||||
containerPort: 8083
|
||||
containerPort: {{ .Values.server.containerPorts.metrics }}
|
||||
protocol: TCP
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz?full=true
|
||||
port: {{ .Values.server.containerPort }}
|
||||
port: server
|
||||
initialDelaySeconds: {{ .Values.server.livenessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.server.livenessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.server.livenessProbe.timeoutSeconds }}
|
||||
|
|
@ -305,7 +307,7 @@ spec:
|
|||
readinessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: {{ .Values.server.containerPort }}
|
||||
port: server
|
||||
initialDelaySeconds: {{ .Values.server.readinessProbe.initialDelaySeconds }}
|
||||
periodSeconds: {{ .Values.server.readinessProbe.periodSeconds }}
|
||||
timeoutSeconds: {{ .Values.server.readinessProbe.timeoutSeconds }}
|
||||
|
|
|
|||
|
|
@ -19,14 +19,14 @@ spec:
|
|||
- name: {{ .Values.server.service.servicePortHttpName }}
|
||||
protocol: TCP
|
||||
port: {{ .Values.server.service.servicePortHttp }}
|
||||
targetPort: {{- if .Values.server.service.namedTargetPort }} {{ .Values.server.name }} {{- else }} {{ .Values.server.containerPort }} {{- end }}
|
||||
targetPort: {{ .Values.server.containerPorts.server }}
|
||||
{{- if eq .Values.server.service.type "NodePort" }}
|
||||
nodePort: {{ .Values.server.service.nodePortHttp }}
|
||||
{{- end }}
|
||||
- name: {{ .Values.server.service.servicePortHttpsName }}
|
||||
protocol: TCP
|
||||
port: {{ .Values.server.service.servicePortHttps }}
|
||||
targetPort: {{- if .Values.server.service.namedTargetPort }} {{ .Values.server.name }} {{- else }} {{ .Values.server.containerPort }} {{- end }}
|
||||
targetPort: {{ .Values.server.containerPorts.server }}
|
||||
{{- if eq .Values.server.service.type "NodePort" }}
|
||||
nodePort: {{ .Values.server.service.nodePortHttps }}
|
||||
{{- end }}
|
||||
|
|
@ -49,4 +49,4 @@ spec:
|
|||
{{- end }}
|
||||
{{- with .Values.server.service.sessionAffinity }}
|
||||
sessionAffinity: {{ . }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
|
|
|||
|
|
@ -70,13 +70,13 @@ spec:
|
|||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: {{ .Values.dex.containerPortHttp }}
|
||||
containerPort: {{ .Values.dex.containerPorts.http }}
|
||||
protocol: TCP
|
||||
- name: grpc
|
||||
containerPort: {{ .Values.dex.containerPortGrpc }}
|
||||
containerPort: {{ .Values.dex.containerPorts.grpc }}
|
||||
protocol: TCP
|
||||
- name: metrics
|
||||
containerPort: {{ .Values.dex.containerPortMetrics }}
|
||||
containerPort: {{ .Values.dex.containerPorts.metrics }}
|
||||
protocol: TCP
|
||||
{{- if .Values.dex.livenessProbe.enabled }}
|
||||
livenessProbe:
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ spec:
|
|||
{{- end }}
|
||||
ports:
|
||||
- name: redis
|
||||
containerPort: {{ .Values.redis.containerPort }}
|
||||
containerPort: {{ .Values.redis.containerPorts.redis }}
|
||||
protocol: TCP
|
||||
resources:
|
||||
{{- toYaml .Values.redis.resources | nindent 10 }}
|
||||
|
|
@ -79,12 +79,12 @@ spec:
|
|||
imagePullPolicy: {{ default .Values.global.image.imagePullPolicy .Values.redis.metrics.image.imagePullPolicy }}
|
||||
env:
|
||||
- name: REDIS_ADDR
|
||||
value: {{ printf "redis://localhost:%v" .Values.redis.containerPort }}
|
||||
value: {{ printf "redis://localhost:%v" .Values.redis.containerPorts.redis }}
|
||||
- name: REDIS_EXPORTER_WEB_LISTEN_ADDRESS
|
||||
value: {{ printf "0.0.0.0:%v" .Values.redis.metrics.containerPort }}
|
||||
value: {{ printf "0.0.0.0:%v" .Values.redis.containerPorts.metrics }}
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: {{ .Values.redis.metrics.containerPort }}
|
||||
containerPort: {{ .Values.redis.containerPorts.metrics }}
|
||||
protocol: TCP
|
||||
resources:
|
||||
{{- toYaml .Values.redis.metrics.resources | nindent 10 }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue