apiVersion: apps/v1
kind: StatefulSet
metadata:
name: dtp
namespace: parasoft-dtp-namespace
labels:
app: DTP
spec:
selector:
matchLabels - name: PARASOFT_POD_NAME #REQUIRED, DO NOT CHANGE
valueFrom:
fieldRef:
app: DTP
serviceName: dtp-service
replicas: 1
templatefieldPath:
metadata:.name
labels:
- name: PARASOFT_POD_NAMESPACE #REQUIRED, DO app:NOT DTPCHANGE
spec:
volumesvalueFrom:
- name: dtp-data
fieldRef:
nfs:
serverfieldPath: NFS_SERVER_HOST
path: /dtp/
# persistentVolumeClaim:
# claimName: dtp-pvc
# Uncomment section below if you are setting up a custom keystore; you will also need to uncomment out the associated volumeMounts below
# - name: keystore-cfgmap-volume
# configMap:
# name: keystore-cfgmap
securityContext:
runAsNonRoot: true
containers:
- name: dtp-server
securityContext:
metadata.namespace
# To configure DTP to connect to your database on startup, please provide your database type, user, user password, and connection URL to the container environment by injecting the values as the DB_TYPE, DB_USER, DB_PASSWORD, and DB_URL environment variables.
# To prevent exposing sensitive data, please create a user password secret to use for the DB_PASSWORD environment variable.
# Note that the database type must be one of the following: mysql | oracle | postgresql
# Note that the environment variable values will override the equivalent persisted values in the PSTRootConfig.xml each time the container or pod is restarted.
# The following are example settings for a MySQL container called "mysql-container", a database called "DTP", a user called "dtp_user", and a user password secret.
# - allowPrivilegeEscalationname: falseDB_TYPE
# capabilitiesvalue: "mysql"
# - dropname: ["ALL"]
DB_USER
# seccompProfile:
value: "dtp_user"
# - typename: RuntimeDefault DB_PASSWORD
#
image: DTP_DOCKER_IMAGE
valueFrom:
# imagePullPolicy: Always
secretKeyRef:
# env:
- name: PARASOFTYOUR_POD_NAME #REQUIRED, DO NOT CHANGE
DB_USER_PASSWORD_SECRET
# valueFrom:
key: YOUR_DB_USER_PASSWORD_SECRET_KEY
# - fieldRef:
name: DB_URL
# fieldPath: metadata.name
- name: PARASOFT_POD_NAMESPACE #REQUIRED, DO NOT CHANGE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
# To configure DTP to connect to your database on startup, please provide your database type, user, user password, and connection URL to the container environment by injecting the values as the DB_TYPE, DB_USER, DB_PASSWORD, and DB_URL environment variables.
# To prevent exposing sensitive data, please create a user password secret to use for the DB_PASSWORD environment variable.
# Note that the database type must be one of the following: mysql | oracle | postgresql
# Note that the environment variable values will override the equivalent persisted values in the PSTRootConfig.xml each time the container or pod is restarted.
# The following are example settings for a MySQL container called "mysql-container", a database called "DTP", a user called "dtp_user", and a user password secret.
#value: "jdbc:mysql://mysql-container:3306/DTP"
# To configure DTP to automatically download the driver for your database on startup, please provide the JDBC driver URL to the container environment by injecting the value as the JDBC_DRIVER_URL environment variable.
# The following is an example URL to download the JDBC driver for MySQL 8.0.30.
# - name: JDBC_DRIVER_URL
# value: "https://repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.30/mysql-connector-java-8.0.30.jar"
# Another option is to download the JDBC driver manually one time.
# See section titled Database and JDBC Client Jar on https://hub.docker.com/r/parasoft/dtp or https://hub.docker.com/r/parasoft/dtp-extension-designer.
# To configure DTP to use JVM arguments, please provide the arguments to the container environment by injecting the value as the JAVA_CONFIG_ARGS environment variable.
# The following is an example JVM argument "com.parasoft.sdm.storage.managers.admin.enable.delete.project.data=true"
# - name: JAVA_CONFIG_ARGS
# value: "-Dcom.parasoft.sdm.storage.managers.admin.enable.delete.project.data=true"
args: ["--run", "dtp"]
- nameports:
DB_TYPE
# - valuename: "mysqldtp-http-port"
# - namecontainerPort: DB_USER8080
# - valuename: "dtp_user-https-port"
# - name containerPort: DB_PASSWORD8443
# valueFrom volumeMounts:
# - secretKeyRef:
# mountPath: "/usr/local/parasoft/data"
name: YOUR_DB_USER_PASSWORD_SECRETdtp-data
# Uncomment section below if you are setting up a custom keystore. Note that key: YOUR_DB_USER_PASSWORD_SECRET_KEY
# - name: DB_URL
# value: "jdbc:mysql://mysql-container:3306/DTP"
# To configure DTP to automatically download the driver for your database on startup, please provide the JDBC driver URL to the container environment by injecting the value as the JDBC_DRIVER_URL environment variable.
# The following is an example URL to download the JDBC driver for MySQL 8.0.30.updates made to these files will not be reflected inside the container once it's been deployed; you will need to restart the container for it to contain any updates.
# - name: keystore-cfgmap-volume
# mountPath: "/usr/local/parasoft/dtp/tomcat/conf/.keystore"
# subPath: keystore
# - name: JDBC_DRIVER_URLkeystore-cfgmap-volume
# valuemountPath: "https:/usr/repo1.maven.org/maven2/mysql/mysql-connector-java/8.0.30/mysql-connector-java-8.0.30.jarlocal/parasoft/dtp/tomcat/conf/server.xml"
# Another option is to download the JDBC driver manually one time.subPath: server-config
# SeeTo sectionprevent titledliveness Databaseprobe andfailures JDBCon Clientenvironments Jar on https://hub.docker.com/r/parasoft/dtp or https://hub.docker.com/r/parasoft/dtp-extension-designer.
# To configure DTP to use JVM arguments, please provide the arguments to the container environment by injecting the value as the JAVA_CONFIG_ARGS environment variable.
# The following is an example JVM argument "com.parasoft.sdm.storage.managers.admin.enable.delete.project.data=true"
#with low or overly taxed RAM/CPU, we recommend increasing the timeout seconds
livenessProbe:
exec:
- namecommand:
JAVA_CONFIG_ARGS
# value: "-Dcom.parasoft.sdm.storage.managers.admin.enable.delete.project.data=true"
healthcheck.sh
args: ["--run", "dtp"]
- --verify
- ports:dtp
- nameinitialDelaySeconds: "http-server"120
containerPortperiodSeconds: 808060
- nametimeoutSeconds: "https-server"30
containerPortfailureThreshold: 84435
- volumeMounts:name: data-collector
- mountPath: "/usr/local/parasoft/data"securityContext:
nameallowPrivilegeEscalation: dtp-datafalse
# Uncomment section below if you are setting up a customcapabilities:
keystore. Note that updates made to these files will not be reflected inside the container once it's been deployed; you will need to restart the container for it to contain any updates.
# - name: keystore-cfgmap-volume
#drop: ["ALL"]
seccompProfile:
type: RuntimeDefault
mountPath: "/usr/local/parasoft/dtp/tomcat/conf/.keystore"
#image: DTP_DOCKER_IMAGE
subPathimagePullPolicy: keystoreAlways
# To inject JVM arguments into the container, -specify name: keystore-cfgmap-volume
# mountPath: "/usr/local/parasoft/dtp/tomcat/conf/server.xml"the "env" property as in the example below, which injects JAVA_DC_CONFIG_ARGS
# subPath: server-configenv:
# To prevent liveness probe failures on environments with- low or overly taxed RAM/CPU, we recommend increasing the timeout secondsname: JAVA_DC_CONFIG_ARGS
# value: "-Dcom.parasoft.sdm.dc.traffic.max.length=1000000"
livenessProbe:
args: ["--run", "datacollector", "--no-copy-data"]
execports:
- command:name: "dc-port"
- healthcheck.sh
containerPort: 8082
volumeMounts:
- --verify mountPath: "/usr/local/parasoft/data"
name: dtp- dtpdata
# To prevent liveness probe failures on environments with low initialDelaySeconds:or 120
overly taxed RAM/CPU, we recommend increasing the periodSeconds: 60timeout seconds
timeoutSecondslivenessProbe: 30
failureThresholdexec:
5
- name: data-collector
command:
securityContext:
- healthcheck.sh
allowPrivilegeEscalation: false
- capabilities:--verify
drop: ["ALL"]- datacollector
seccompProfileinitialDelaySeconds: 120
typeperiodSeconds: RuntimeDefault60
imagetimeoutSeconds: DTP_DOCKER_IMAGE30
imagePullPolicy failureThreshold: Always5
# ToUncomment injectsection JVMbelow argumentsif intousing theDTP container,with specifyExtension the "env" property as in the example below, which injects JAVA_DC_CONFIG_ARGSDesigner
# - name: extension-designer
# envsecurityContext:
# - nameallowPrivilegeEscalation: JAVA_DC_CONFIG_ARGSfalse
# valuecapabilities: "-Dcom.parasoft.sdm.dc.traffic.max.length=1000000"
# args: ["--run", "datacollector", "--no-copy-data drop: ["ALL"]
# ports seccompProfile:
# - containerPorttype: 8082RuntimeDefault
# volumeMounts:
image: DTP_DOCKER_IMAGE
# - mountPathimagePullPolicy: "/usr/local/parasoft/data"
name: dtp-data
# To prevent liveness probe failures on environments with low or overly taxed RAM/CPU, we recommend increasing the timeout seconds
Always
# To inject JVM arguments into the container, specify the "env" property as in the example below, which injects JAVA_CONFIG_ARGS
# args: ["--run", "dtpservices"]
# livenessProbeports:
# - exec:
name: "dep-port"
# commandcontainerPort:
8314
# - healthcheck.sh
volumeMounts:
# - - --verify
mountPath: "/usr/local/parasoft/data"
# name: dtp- datacollectordata
# To prevent liveness probe failures on environments with low initialDelaySeconds:or 120
overly taxed RAM/CPU, we recommend increasing the periodSeconds: 60
timeout seconds
# timeoutSecondslivenessProbe: 30
# failureThresholdexec: 5
# Uncomment section below if using DTP with Extension Designer
# command:
# - name: extension-designer
# - securityContext:healthcheck.sh
# allowPrivilegeEscalation: false - --verify
# - capabilities:dtpservices
# dropinitialDelaySeconds: ["ALL"]120
# seccompProfileperiodSeconds: 60
# typetimeoutSeconds: RuntimeDefault30
# imagefailureThreshold: DTP_DOCKER_IMAGE5
# Uncomment section below if using Extension imagePullPolicy: AlwaysDesigner with an external MongoDB
# To inject JVM arguments into the container, specify the "env" property as in the example below, which injects JAVA_CONFIG_ARGSenv:
# - name: DEP_USE_REMOTE_DB
# args value: ["--run", "dtpservices"]"true"
# - ports:name: DEP_DB_HOSTNAME
# - containerPortvalue: 8314
"mongodb-hostname" # Put your mongodb hostname volumeMounts:here
# - mountPath: "/usr/local/parasoft/data"name: DEP_DB_PORT
# namevalue: dtp-data
# To prevent liveness probe failures on environments with low or overly taxed RAM/CPU, we recommend increasing the timeout seconds
# livenessProbe:
#"27017"
restartPolicy: Always
serviceAccountName: parasoft-account
automountServiceAccountToken: true
imagePullSecrets:
- exec:name: YOUR_SECRET
---
# ==== DTP Service Definition ====
apiVersion: v1
kind: Service
metadata:
name: dtp-svc
commandnamespace: parasoft-dtp-namespace
spec:
# type: NodePort
selector:
app: DTP
- healthcheck.sh
#ports:
- name: "dtp-http-port"
- --verify
#protocol: TCP
port: 8080
- dtpservicesnodePort: 30080
# - name: "dc-port"
initialDelaySecondsprotocol: 120TCP
# port: 8082
periodSecondsnodePort: 6030082
# - name: "dtp-https-port"
timeoutSecondsprotocol: 30TCP
# port: 8443
failureThreshold nodePort: 530443
# Uncomment section below if using DTP with Extension Designer
# with an- external MongoDBname: "dep-port"
# protocol: env:TCP
# port: 8314
# - name: DEP_USE_REMOTE_DB
# nodePort: 30314
# SERVICE CONFIG value: "true"NOTES:
# - name: DEP_DB_HOSTNAME
# value: "mongodb-hostname" # Put your mongodb hostname here
# - name: DEP_DB_PORT
# value: "27017"
restartPolicy: Always
serviceAccountName: parasoft-account
automountServiceAccountToken: true
imagePullSecrets:
- name: YOUR_SECRET
---
apiVersion: v1
kind: Service
metadata:
name: dtp
namespace: parasoft-dtp-namespace
spec:
selector:
app: DTP
ports:
- name: "http-server"
protocol: TCP
port: 8080
targetPort: 8080
- name: "data-collector"
protocol: TCP
port: 8082
targetPort: 8082
- name: "https-server"
protocol: TCP
port: 8443
targetPort: 8443
# Uncomment section below if using DTP with Extension Designer
# - name: "extension-designer"
# protocol: TCP
# port: 8314
# targetPort: 8314
---
apiVersion: v1
kind: Service
metadata:
name: dtp-external
namespace: parasoft-dtp-namespace
spec:
type: NodePort
selector:
app: DTP
ports:
- port: 8080
name: HTTP_PORT_NAME
nodePort: XXXXX
-'name' can be whatever you want, but must follow the DNS label naming conventions
# 'nodePort' must be between 30000-32768
# 'spec.selector' must match 'metadata.labels' in pod config |