#sonar2-pod.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: sonar-deployment
spec:
replicas: 1
selector:
matchLabels:
app: sonar-pod
template:
metadata:
labels:
app: sonar-pod
spec:
initContainers:
- name: init-sysctl
image: busybox
imagePullPolicy: IfNotPresent
command: ["sysctl", "-w", "vm.max_map_count=262144"]
securityContext:
privileged: true
containers:
- name: sonar
image: acrth01seanshared01.azurecr.io/aia/sonarqube:221031-1800
imagePullPolicy: Always
ports:
- containerPort: 9000
resources:
limits:
cpu: 4000m
memory: 12288Mi
requests:
cpu: 2000m
memory: 6144Mi
env:
- name: sonarqube_db_ID
valueFrom:
secretKeyRef:
key: secret-thdpsprd02-thdps-id
name: th-prd-csi-secret
- name: sonarqube_db_PWD
valueFrom:
secretKeyRef:
key: secret-thdpsprd02-thdps-pwd
name: th-prd-csi-secret
volumeMounts:
- name: backup-sonar
mountPath: /sonarqube793/backup
imagePullSecrets:
- name: default-token-gddm7
volumes:
- name: backup-sonar
persistentVolumeClaim:
claimName: sonar-prd-pvc