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

53 lines
1.5 KiB
Smarty

{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "stx-builder.name" -}}
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Create a default fully qualified app name.
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
If release name contains chart name it will be used as a full name.
*/}}
{{- define "stx-builder.fullname" -}}
{{- if .Values.fullnameOverride }}
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- $name := default .Chart.Name .Values.nameOverride }}
{{- if contains $name .Release.Name }}
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
{{- else }}
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
{{- end }}
{{- end }}
{{- end }}
{{/*
Create chart name and version as used by the chart label.
*/}}
{{- define "stx-builder.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}
{{/*
Common labels
*/}}
{{- define "stx-builder.labels" -}}
helm.sh/chart: {{ include "stx-builder.chart" . }}
{{ include "stx-builder.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}
{{/*
Selector labels
*/}}
{{- define "stx-builder.selectorLabels" -}}
app.kubernetes.io/name: {{ include "stx-builder.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}