summaryrefslogtreecommitdiffstats
path: root/kubernetes/dmaap/components/message-router/templates/statefulset.yaml
diff options
context:
space:
mode:
authorSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-03-06 08:58:23 +0100
committerSylvain Desbureaux <sylvain.desbureaux@orange.com>2020-03-06 09:05:15 +0100
commitbe7288889ab975fd7df625eb24463994a2684828 (patch)
tree57ac582da5e10773fb7b55624b6e3b1a85bb96f5 /kubernetes/dmaap/components/message-router/templates/statefulset.yaml
parent88b2f92e51dc29461e0ebe443a24b9e5d99b11be (diff)
[DMaaP MR] Use HTTPS only for external traffic
Use the new template features to create two services for DMaaP Message Router: * One of ClusterIP type with HTTP AND HTTPS port, with the same name as before. * Another of NodePort type with HTTPS only port, with a new name (this one should be used only for external traffic) I've also replaced `tabs` iby spaces in two resources files so it's easier to read the configmap. Issue-ID: DMAAP-1400 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I394e0b5327ffe2605f0c4c8b134e49553b06232c
Diffstat (limited to 'kubernetes/dmaap/components/message-router/templates/statefulset.yaml')
-rw-r--r--kubernetes/dmaap/components/message-router/templates/statefulset.yaml30
1 files changed, 10 insertions, 20 deletions
diff --git a/kubernetes/dmaap/components/message-router/templates/statefulset.yaml b/kubernetes/dmaap/components/message-router/templates/statefulset.yaml
index 35cc5e7405..c17fda1108 100644
--- a/kubernetes/dmaap/components/message-router/templates/statefulset.yaml
+++ b/kubernetes/dmaap/components/message-router/templates/statefulset.yaml
@@ -12,23 +12,16 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-apiVersion: apps/v1beta1
+
+apiVersion: apps/v1
kind: StatefulSet
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
+ selector: {{- include "common.selectors" . | nindent 4 }}
+ serviceName: {{ include "common.servicename" . }}
replicas: {{ .Values.replicaCount }}
template:
- metadata:
- labels:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
initContainers:
- command:
@@ -51,20 +44,18 @@ spec:
- name: {{ include "common.name" . }}
image: "{{ include "common.repository" . }}/{{ .Values.image }}"
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- ports:
- - containerPort: {{ .Values.service.externalPort }}
- - containerPort: {{ .Values.service.externalPort2 }}
+ ports: {{ include "common.containerPorts" . | nindent 10 }}
{{- if eq .Values.liveness.enabled true }}
livenessProbe:
tcpSocket:
- port: {{ .Values.service.externalPort }}
+ port: {{ .Values.liveness.port }}
initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.liveness.periodSeconds }}
timeoutSeconds: {{ .Values.liveness.timeoutSeconds }}
{{ end -}}
readinessProbe:
tcpSocket:
- port: {{ .Values.service.externalPort }}
+ port: {{ .Values.readiness.port }}
initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.readiness.periodSeconds }}
timeoutSeconds: {{ .Values.readiness.timeoutSeconds }}
@@ -87,8 +78,7 @@ spec:
- mountPath: /appl/dmaapMR1/etc/keyfile
subPath: mykey
name: mykey
- resources:
-{{ include "common.resources" . }}
+ resources: {{ include "common.resources" . | nindent 12 }}
volumes:
- name: localtime
hostPath: