# 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/v1
kind: Deployment
metadata:
- name: {{ include "ricapp.fullname" . }}
+ name: {{ include "ricxapp.fullname" . }}
labels:
- app.kubernetes.io/name: {{ include "ricapp.name" . }}
- helm.sh/chart: {{ include "ricapp.chart" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
- app.kubernetes.io/managed-by: {{ .Release.Service }}
+ app: {{ include "ricxapp.namespace" . }}-{{ include "ricxapp.name" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
spec:
- replicas: {{ .Values.ricapp.replicaCount }}
+ replicas: {{ .Values.ricxapp.replicaCount }}
selector:
matchLabels:
- app.kubernetes.io/name: {{ include "ricapp.name" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
+ app: {{ include "ricxapp.namespace" . }}-{{ include "ricxapp.name" . }}
+ release: {{ .Release.Name }}
template:
metadata:
labels:
- app.kubernetes.io/name: {{ include "ricapp.name" . }}
- app.kubernetes.io/instance: {{ .Release.Name }}
+ app: {{ include "ricxapp.namespace" . }}-{{ include "ricxapp.name" . }}
+ release: {{ .Release.Name }}
spec:
+ hostname: {{ include "ricxapp.name" . }}
imagePullSecrets:
- - name: {{ .Release.Name }}-docker-registry-key
+ - name: {{ include "ricxapp.imagepullsecret" . }}
containers:
- - name: {{ .Chart.Name }}
- image: "{{ .Values.global.repository }}/{{ .Values.ricapp.image.name }}:{{ .Values.ricapp.image.tag }}"
- imagePullPolicy: {{ .Values.global.image.pullPolicy }}
- # enable the next two elements if wanting to test pod bypassing its own entrypoint
- #command: ["sh"]
- #args:
- # - -c
- # - "while sleep 2; do echo thinking; done"
+ - name: {{ include "ricxapp.containername" . }}
+ image: "{{ .Values.ricxapp.image.repository }}/{{ .Values.ricxapp.image.name }}:{{ .Values.ricxapp.image.tag }}"
+ imagePullPolicy: {{ .Values.ricxapp.image.pullPolicy }}
ports:
- name: http
- containerPort: 8080
+ containerPort: {{ .Values.ricxapp.service.http.containerPort }}
+ protocol: TCP
+ - name: rmrRoute
+ containerPort: {{ .Values.ricxapp.service.rmr.route.port }}
+ protocol: TCP
+ - name: rmrData
+ containerPort: {{ .Values.ricxapp.service.rmr.data.port }}
protocol: TCP
volumeMounts:
- name: config-volume
- mountPath: {{ .Values.ricapp.appconfigpath }}
- - name: secret-volume
- mountPath: {{ .Values.ricapp.appsecretpath }}
+ mountPath: {{ .Values.ricxapp.appconfig.path }}
envFrom:
- configMapRef:
- name: {{ .Release.Name }}-appenv
+ name: {{ include "ricxapp.configmapname" . }}-appenv
livenessProbe:
- exec:
- command:
- - /bin/bash
- - -c
- - ps -ef | grep {{ .Values.ricapp.livenessprocessname }}| grep -v "grep"
- initialDelaySeconds: 120
- periodSeconds: 30
+ httpGet:
+ path: {{ .Values.ricxapp.probes.healthAliveCheckEndpoint }}
+ port: {{ .Values.ricxapp.service.http.containerPort }}
+ initialDelaySeconds: 5
+ periodSeconds: 15
readinessProbe:
httpGet:
- path: /
- port: http
+ path: {{ .Values.ricxapp.probes.healthReadyCheckEndpoint }}
+ port: {{ .Values.ricxapp.service.http.containerPort }}
+ initialDelaySeconds: 5
+ periodSeconds: 15
restartPolicy: Always
- resources:
- {{- toYaml .Values.resources | nindent 12 }}
- securityContext:
- # ubuntu
- runAsUser: 1000
- allowPrivilegeEscalation: false
- {{- with .Values.nodeSelector }}
- nodeSelector:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.affinity }}
- affinity:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- {{- with .Values.tolerations }}
- tolerations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
-
volumes:
- name: config-volume
configMap:
- name: {{ .Release.Name }}-appconfig
- - name: secret-volume
- secret:
- secretName: {{ .Release.Name }}-appsecret
+ name: {{ include "ricxapp.configmapname" . }}-appconfig