59 lines
1.5 KiB
YAML
59 lines
1.5 KiB
YAML
{{/*
|
|
#
|
|
# Copyright (c) 2018 Wind River Systems, Inc.
|
|
#
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
#
|
|
*/}}
|
|
|
|
{{- if eq .Values.global.deployAs "Deployment" }}
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: {{ .Values.global.name }}
|
|
namespace: {{ .Release.Namespace }}
|
|
spec:
|
|
replicas: {{ .Values.global.replicas }}
|
|
selector:
|
|
matchLabels:
|
|
app: {{ .Values.global.name }}
|
|
strategy:
|
|
type: Recreate
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: {{ .Values.global.name }}
|
|
spec:
|
|
{{- if (.Values.global.rbac) or (.Values.global.reuseRbac)}}
|
|
serviceAccount: {{ .Values.rbac.serviceAccount }}
|
|
{{- end }}
|
|
affinity:
|
|
podAntiAffinity:
|
|
requiredDuringSchedulingIgnoredDuringExecution:
|
|
- labelSelector:
|
|
matchExpressions:
|
|
- key: app
|
|
operator: In
|
|
values:
|
|
- {{ .Values.global.name }}
|
|
topologyKey: kubernetes.io/hostname
|
|
containers:
|
|
- name: {{ .Values.global.name }}
|
|
image: {{ .Values.images.tags.rbd_provisioner | quote }}
|
|
env:
|
|
- name: PROVISIONER_NAME
|
|
value: {{ .Values.global.provisioner_name }}
|
|
{{- if .Values.global.nodeSelector }}
|
|
nodeSelector:
|
|
{{ .Values.global.nodeSelector | toYaml | trim | indent 8 }}
|
|
{{- end }}
|
|
{{- if .Values.global.tolerations }}
|
|
tolerations:
|
|
{{ .Values.global.tolerations | toYaml | trim | indent 8 }}
|
|
{{- end}}
|
|
{{- if .Values.global.resources }}
|
|
resources:
|
|
{{ .Values.global.resources | toYaml | trim | indent 8 }}
|
|
{{- end }}
|
|
{{- end }}
|