I have this deployement.yaml file :
kind: "Template"
apiVersion: "v1"
metadata:
name: "deploymentConfig-gui-template-${Platform}"
annotations:
description: "Template for gui deploymentConfig on ${Platform}"
objects:
- kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v1
metadata:
name: gui-${oPlatform}-autoscaling
spec:
scaleTargetRef:
kind: DeploymentConfig
name: scoring-gui-deploy-${oPlatform}
apiVersion: v1
minReplicas: ${{Min_replicas}}
maxReplicas: ${{Max_replicas}}
targetCPUUtilizationPercentage: ${{Target_CPU_use}}
- kind: "DeploymentConfig"
apiVersion: "v1"
metadata:
name: gui-deploy-${oPlatform}
app: gui-deploy-${oPlatform}
spec:
template:
metadata:
labels:
name: gui-${Platform}
app: gui-${Platform}
spec:
imagePullSecrets:
- name: docker-pull-secret
containers:
- name: gui-private-${Platform}
image: ${Registry_URL}/${DockerImageGuiPrivateName}:${DockerImageVersion}
imagePullPolicy: Always
ports:
- containerPort: 8004
protocol: "TCP"
readinessProbe:
httpGet:
path: /status
port: 8004
scheme: HTTP
initialDelaySeconds: 30
timeoutSeconds: 2
periodSeconds: 10
successThreshold: 1
failureThreshold: 2
livenessProbe:
httpGet:
path: /status
port: 8004
scheme: HTTP
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 10
successThreshold: 1
failureThreshold: 2
resources:
requests:
cpu: ${Private_request_CPU}
memory: ${Private_request_memory}
limits:
cpu: ${Private_limit_CPU}
memory: ${Private_limit_memory}
env:
- name: GUI_VERSION
value: ${DockerImageVersion}
envFrom:
- configMapRef:
name: gui-configmap-global
- configMapRef:
name: gui-configmap-site
- secretRef:
name: gui-secret
volumeMounts:
- name: pvc-private-ca-mail
mountPath: "/certificat/"
readOnly: true
- name: scoring-gui-public-${Platform}
image: ${Registry_URL}/${DockerImageGuiPublicName}:${DockerImageVersion}
imagePullPolicy: Always
ports:
- containerPort: 8080
protocol: "TCP"
readinessProbe:
httpGet:
path: /status
port: 8080
scheme: HTTP
initialDelaySeconds: 30
timeoutSeconds: 2
periodSeconds: 10
successThreshold: 1
failureThreshold: 2
livenessProbe:
httpGet:
path: /status
port: 8080
scheme: HTTP
initialDelaySeconds: 30
timeoutSeconds: 5
periodSeconds: 10
successThreshold: 1
failureThreshold: 2
resources:
requests:
cpu: ${Public_request_CPU}
memory: ${Public_request_memory}
limits:
cpu: ${Public_Limit_CPU}
memory: ${Public_limit_memory}
env:
- name: GUI_VERSION
value: ${DockerImageVersion}
envFrom:
- configMapRef:
name: gui-configmap-global
- configMapRef:
name: gui-configmap-site
- secretRef:
name: gui-secret
volumeMounts:
- name: pvc-private-ca-mail
mountPath: "/certificat/"
readOnly: true
volumes:
- name: pvc-private-ca-mail
secret:
secretName: gui-ca-mail-secret
items:
- key: gui_ca_mail
path: gui_ca_mail.pem
replicas: 1
revisionHistoryLimit: 1
and when i run the deployement i get this error :
level=error msg="Error parsing YAML: (quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$')" level=error msg="Error fetching Kubernetes resources quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'
I know that the problem cames from the variables that i made in ressources. Can anyone know how to solve it by keeping the variables ? And what I need to do (specifically!) to fix it?
I tried to make a deployment and i get this error.
I expect something like this :
Efficiency - CPU limits are set
Efficiency - Memory limits are set