summaryrefslogtreecommitdiffstats
path: root/kubernetes/aai/templates
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/aai/templates')
-rw-r--r--kubernetes/aai/templates/deployment.yaml13
-rw-r--r--kubernetes/aai/templates/service.yaml15
2 files changed, 13 insertions, 15 deletions
diff --git a/kubernetes/aai/templates/deployment.yaml b/kubernetes/aai/templates/deployment.yaml
index 03663454d7..2722412bb6 100644
--- a/kubernetes/aai/templates/deployment.yaml
+++ b/kubernetes/aai/templates/deployment.yaml
@@ -1,6 +1,7 @@
{{/*
# Copyright (c) 2018 Amdocs, Bell Canada, AT&T
# Modifications Copyright (c) 2020 Nokia, Orange
+# Modifications Copyright © 2023 Nordix Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -47,7 +48,7 @@ spec:
checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
spec:
terminationGracePeriodSeconds: {{ .Values.service.terminationGracePeriodSeconds }}
- initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
+ initContainers:
- command:
- /app/ready.py
args:
@@ -90,26 +91,23 @@ spec:
subPath: haproxy.cfg
{{ end }}
name: haproxy-cfg
- {{- include "common.certInitializer.volumeMount" . | nindent 8 }}
ports:
- containerPort: {{ .Values.service.internalPort }}
- - containerPort: {{ .Values.service.internalPlainPort }}
- containerPort: {{ .Values.metricsService.internalPort }}
# disable liveness probe when breakpoints set in debugger
# so K8s doesn't restart unresponsive container
{{- if eq .Values.liveness.enabled true }}
livenessProbe:
tcpSocket:
- port: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.internalPort .Values.service.internalPlainPort }}
+ port: {{ .Values.service.internalPort }}
initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.liveness.periodSeconds }}
{{ end -}}
readinessProbe:
httpGet:
path: /aai/util/echo
- port: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.internalPort .Values.service.internalPlainPort }}
- #scheme: HTTPS
- scheme: {{ (eq "true" (include "common.needTLS" .)) | ternary "HTTPS" "HTTP" }}
+ port: {{ .Values.service.internalPort }}
+ scheme: HTTP
httpHeaders:
- name: X-FromAppId
value: OOM_ReadinessCheck
@@ -143,6 +141,5 @@ spec:
- name: haproxy-cfg
configMap:
name: aai-deployment-configmap
- {{ include "common.certInitializer.volumes" . | nindent 8 }}
imagePullSecrets:
- name: "{{ include "common.namespace" . }}-docker-registry-key"
diff --git a/kubernetes/aai/templates/service.yaml b/kubernetes/aai/templates/service.yaml
index a8c3c3957e..5bb5c8bf28 100644
--- a/kubernetes/aai/templates/service.yaml
+++ b/kubernetes/aai/templates/service.yaml
@@ -26,16 +26,17 @@ metadata:
heritage: {{ .Release.Service }}
spec:
ports:
- - name: {{ .Values.service.portName }}{{ if (include "common.needTLS" .) }}s{{ end }}
- port: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.externalPort .Values.service.externalPlainPort }}
- targetPort: {{ (eq "true" (include "common.needTLS" .)) | ternary .Values.service.internalPort .Values.service.internalPlainPort }}
+ - name: {{ .Values.service.portName }}
+ port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
{{- if eq .Values.service.type "NodePort" }}
+ {{ if not (include "common.ingressEnabled" .) }}
nodePort: {{ .Values.global.nodePortPrefix | default .Values.nodePortPrefix }}{{ .Values.service.nodePort }}
+ {{ end }}
{{- end }}
- type: {{ .Values.service.type }}
+ type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}{{ .Values.service.type }}{{ end }}
selector:
app: {{ include "common.name" . }}
- clusterIP: {{ .Values.service.aaiServiceClusterIp }}
sessionAffinity: {{ .Values.service.sessionAffinity }}
---
apiVersion: v1
@@ -51,8 +52,8 @@ metadata:
spec:
ports:
- name: {{ .Values.service.portName }}
- port: {{ .Values.service.externalPlainPort }}
- targetPort: {{ .Values.service.internalPlainPort }}
+ port: {{ .Values.service.externalPort }}
+ targetPort: {{ .Values.service.internalPort }}
type: ClusterIP
selector:
app: {{ include "common.name" . }}