Zhixiong Chi 8bcee26f1a stx tool: control: Add the support of control module
Implement the stx control module so that the developer could
manage the four containers with the 'stx control xxx' command.
Containers: (stx-builder|stx-pkgbuilder|stx-lat-tool|stx-repomgr)

Now we assume that we have a minikube env to be ready for this
module, we can use it directly. For the minikube env installation
we can build it with the stx-init-env script later.

Now support the action: [status|start|stop|enter|upgrade]

stx control status:  Check status of the containers
stx control start:   Boot the containers up
stx control stop:    Shutdown the containers
stx control enter:   Login the container(default builder)
stx control upgrade: Upgrade the containers

This module will be used after the developer have a minikube env,

Please refer to the more help information with the command
'stx control --help'

Story: 2008862
Task: 42514

Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
Change-Id: I0c25e0f784671e90c56d5d367b12a27c3f3fa7cf
2021-09-15 21:35:47 -04:00

61 lines
1.7 KiB
YAML

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "stx-repomgr.fullname" . }}
labels:
{{- include "stx-repomgr.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "stx-repomgr.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "stx-repomgr.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
tty: true
volumeMounts:
- name: {{ .Values.volumeMounts.name }}
mountPath: {{ .Values.volumeMounts.mountPath}}
resources:
{{- toYaml .Values.resources | nindent 12 }}
volumes:
- name: {{ .Values.volumes.name }}
hostPath:
path: {{ .Values.volumes.hostPath.path }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}