...
Code Block | ||||
---|---|---|---|---|
| ||||
# Stable access for clients to license server
apiVersion: v1
kind: ServiceAccount
metadata:
name: parasoft-account
namespace: parasoft-lss-namespace
automountServiceAccountToken: true
---
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: parasoft-read
namespace: parasoft-lss-namespace
rules:
- apiGroups:
- "*"
resources:
- "*"
verbs:
- get
- read
- list
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: parasoft-read-bind
namespace: parasoft-lss-namespace
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: parasoft-read
subjects:
- kind: ServiceAccount
name: parasoft-account
namespace: parasoft-lss-namespace |
...
Code Block | ||||
---|---|---|---|---|
| ||||
apiVersion: v1 kind: Pod metadata: name: lss namespace: parasoft-lss-namespace labels: app: LSS spec: volumes: - name: lss-data nfs: server: NFS_SERVER_HOST path: /lss/ # 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: lss-server securityContext: allowPrivilegeEscalation: false capabilities: drop: ["ALL"] seccompProfile: type: RuntimeDefault image: LSS_DOCKER_IMAGE imagePullPolicy: Always env: - name: PARASOFT_POD_NAME #REQUIRED, DO NOT CHANGE valueFrom: fieldRef: fieldPath: metadata.name - name: PARASOFT_POD_NAMESPACE #REQUIRED, DO NOT CHANGE valueFrom: fieldRef: fieldPath: metadata.namespace # To inject JVM arguments into the container, specify the "env" property as in the example below, which injects LSS_JAVA_OPTS # - name: LSS_JAVA_OPTS # value: "-Dparasoft.use.license.v2=true" ports: - containerPort: 8080 name: "http-server" - containerPort: 8443 name: "https-server" volumeMounts: - mountPath: "/usr/local/parasoft/license-server/data" name: lss-data # Uncomment section below if you are setting up a custom 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 # mountPath: "/usr/local/parasoft/license-server/app/tomcat/conf/.keystore" # subPath: keystore # - name: keystore-cfgmap-volume # mountPath: "/usr/local/parasoft/license-server/app/tomcat/conf/server.xml" # subPath: server-config # To prevent liveness probe failures on environments with low or overly taxed RAM/CPU, we recommend increasing the timeout seconds livenessProbe: exec: command: - healthcheck.sh initialDelaySeconds: 120 periodSeconds: 60 timeoutSeconds: 30 failureThreshold: 5 restartPolicy: Always serviceAccountName: parasoft-account automountServiceAccountToken: true imagePullSecrets: - name: YOUR_SECRET --- apiVersion: v1 kind: Service metadata: name: lss namespace: parasoft-lss-namespace spec: type: NodePort selector: app: LSS ports: - port: 8080 name: PORT_NAME_1 nodePort: XXXXX - port: 8443 name: PORT_NAME_2 nodePort: XXXXX # SERVICE CONFIG NOTES: # 'name' can be whatever you want # 'nodePort' must be between 30000-32768 # 'spec.selector' must match 'metadata.labels' in pod config |
...
Code Block | ||||
---|---|---|---|---|
| ||||
apiVersion: apps/v1 kind: StatefulSet metadata: name: lss namespace: parasoft-lss-namespace labels: app: LSS spec: selector: matchLabels: app: LSS serviceName: lss-service replicas: 1 template: metadata: labels: app: LSS spec: volumes: - name: lss-data nfs: server: NFS_SERVER_HOST path: /lss/ # persistentVolumeClaim: # claimName: lss-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: lss-server securityContext: allowPrivilegeEscalation: false capabilities: drop: [ "ALL" ] seccompProfile: type: RuntimeDefault image: LSS_DOCKER_IMAGE imagePullPolicy: Always env: - name: PARASOFT_POD_NAME #REQUIRED, DO NOT CHANGE valueFrom: fieldRef: fieldPath: metadata.name - name: PARASOFT_POD_NAMESPACE #REQUIRED, DO NOT CHANGE valueFrom: fieldRef: fieldPath: metadata.namespace # To inject JVM arguments into the container, specify the "env" property as in the example below, which injects LSS_JAVA_OPTS # - name: LSS_JAVA_OPTS # value: "-Dparasoft.use.license.v2=true" ports: - containerPort: 8080 name: "http-server" - containerPort: 8443 name: "https-server" volumeMounts: - name: lss-data mountPath: "/usr/local/parasoft/license-server/data" # Uncomment section below if you are setting up a custom 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 # mountPath: "/usr/local/parasoft/license-server/app/tomcat/conf/.keystore" # subPath: keystore # - name: keystore-cfgmap-volume # mountPath: "/usr/local/parasoft/license-server/app/tomcat/conf/server.xml" # subPath: server-config # To prevent liveness probe failures on environments with low or overly taxed RAM/CPU, we recommend increasing the timeout seconds livenessProbe: exec: command: - healthcheck.sh initialDelaySeconds: 120 periodSeconds: 60 timeoutSeconds: 30 failureThreshold: 5 restartPolicy: Always serviceAccountName: parasoft-account automountServiceAccountToken: true imagePullSecrets: - name: YOUR_SECRET --- apiVersion: v1 kind: Service metadata: name: lss namespace: parasoft-lss-namespace spec: type: NodePort selector: app: LSS ports: - port: 8080 name: PORT_NAME_1 nodePort: XXXXX - port: 8443 name: PORT_NAME_2 nodePort: XXXXX # SERVICE CONFIG NOTES: # 'name' can be whatever you want # 'nodePort' must be between 30000-32768 # 'spec.selector' must match 'metadata.labels' in pod config |
...