我一直在尝试安装clio版本。
虚拟机: ubuntu 18.04 16 核 32 GB RAM 500 GB 存储。
命令 :
bash /home/ubuntu/system-integration/tools/aio_k8s_deployer/aio_k8s_deployer.sh 所有 acai-server ubuntu 通用
几乎所有安装步骤都已成功完成,但在“setup-lum”期间,出现以下错误。
错误:
lum-helm/templates/deployment.yaml 上的 YAML 解析错误:将 YAML 转换为 JSON 时出错:yaml:第 36 行:在此上下文中不允许映射值
解决方法:
我能够通过 a. 解决这些错误(通过 helm install --dry-run 测试)。删除“资源、亲和和容忍块 b. 将“Release.Name”替换为实际发布值(例如 license-clio-configmap)
但是当我运行完整的安装命令时,这些 helms 图表会再次更新。
完全错误:
...
- helm install -f kubernetes/values.yaml --name license-clio --namespace default --debug ./kubernetes/license-usage-manager/lum-helm [debug] Created tunnel using local port: '46109'
[调试] 服务器:“127.0.0.1:46109”
[调试] 原始图表版本:“” [调试] 图表路径:/deploy/system-integration/AIO/lum/kubernetes/license-usage-manager/lum-helm
lum-helm/templates/deployment.yaml 上的 YAML 解析错误:将 YAML 转换为 JSON 时出错:yaml:第 36 行:在此上下文中不允许映射值
deployment.yaml 的 Yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "lum-helm.fullname" . }}
labels:
app: {{ template "lum-helm.name" . }}
chart: {{ template "lum-helm.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "lum-helm.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "lum-helm.name" . }}
release: {{ .Release.Name }}
spec:
initContainers:
- name: wait-for-db
image: busybox:1.28
command:
- 'sh'
- '-c'
- >
until nc -z -w 2 {{ .Release.Name }}-postgresql {{ .Values.postgresql.servicePort }} && echo postgresql ok;
do sleep 2;
done
containers:
- name: {{ .Chart.Name }}
image: nexus3.acumos.org:10002/acumos/lum-server:default
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: DATABASE_PASSWORD
valueFrom:
secretKeyRef:
name: {{ .Release.Name }}-postgresql
key: postgresql-password
- name: NODE
volumeMounts:
- name: config-volume
mountPath: /opt/app/lum/etc/config.json
subPath: lum-config.json
ports:
- name: http
containerPort: 2080
protocol: TCP
livenessProbe:
httpGet:
path: '/api/healthcheck'
port: http
initialDelaySeconds: 60
periodSeconds: 10
failureThreshold: 10
readinessProbe:
httpGet:
path: '/api/healthcheck'
port: http
initialDelaySeconds: 60
periodSeconds: 10
failureThreshold: 10
resources:
{{ toYaml .Values.resources | indent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{ toYaml . | indent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{ toYaml . | indent 8 }}
{{- end }}
volumes:
- name: config-volume
configMap:
name: {{ .Release.Name }}-configmap