Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
177 changes: 177 additions & 0 deletions assets/pxbbq/pxbbq.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,177 @@
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: mongo
labels:
app.kubernetes.io/name: mongo
app.kubernetes.io/component: backend
spec:
serviceName: "mongo"
selector:
matchLabels:
app.kubernetes.io/name: mongo
app.kubernetes.io/component: backend
replicas: 1
template:
metadata:
labels:
app.kubernetes.io/name: mongo
app.kubernetes.io/component: backend
spec:
containers:
- name: mongo
image: mongo:7.0.9
imagePullPolicy: IfNotPresent
env:
- name: MONGO_INITDB_ROOT_USERNAME
value: porxie
- name: MONGO_INITDB_ROOT_PASSWORD
value: "porxie"
args:
- "--bind_ip"
- "0.0.0.0"
resources:
requests:
cpu: 100m
memory: 100Mi
ports:
- containerPort: 27017
volumeMounts:
- name: mongo-data-dir
mountPath: /data/db
livenessProbe:
exec:
command: ["mongosh", "--eval", "db.adminCommand({ping: 1})"]
initialDelaySeconds: 30 # Give MongoDB time to start before the first check
timeoutSeconds: 5
periodSeconds: 10 # How often to perform the probe
failureThreshold: 3
tolerations:
- key: "node.kubernetes.io/unreachable"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 10
- key: "node.kubernetes.io/not-ready"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 10
terminationGracePeriodSeconds: 5
volumeClaimTemplates:
- metadata:
name: mongo-data-dir
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 1Gi
storageClassName: px-csi-db
---
apiVersion: v1
kind: Service
metadata:
name: mongo
labels:
app.kubernetes.io/name: mongo
app.kubernetes.io/component: backend
spec:
ports:
- port: 27017
targetPort: 27017
type: ClusterIP
selector:
app.kubernetes.io/name: mongo
app.kubernetes.io/component: backend
---
apiVersion: v1
kind: Service
metadata:
name: pxbbq-svc
labels:
app: pxbbq-web
spec:
ports:
- port: 80
targetPort: 8080
nodePort: 30010
type: NodePort
selector:
app: pxbbq-web
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: pxbbq-web
spec:
replicas: 3
selector:
matchLabels:
app: pxbbq-web
template:
metadata:
labels:
app: pxbbq-web
spec:
containers:
- name: pxbbq-web
image: eshanks16/pxbbq:v4.5.2
env:
- name: MONGO_INIT_USER
value: "porxie" #Mongo User with permissions to create additional databases and users. Typically "porxie" or "pds"
- name: MONGO_INIT_PASS
value: "porxie" #Required to connect the init user to the database. If using the mongodb yaml supplied, use "porxie"
- name: MONGO_NODES
value: "mongo" #COMMA SEPARATED LIST OF MONGO ENDPOINTS. Example: mongo1.dns.name,mongo2.dns.name
- name: MONGO_PORT
value: "27017" # MongoDB Port
- name: MONGO_USER
value: porxie #Mongo DB User that will be created by using the Init_User
- name: MONGO_PASS
value: "porxie" #Mongo DB Password for User that will be created by using the Init User
- name: API_SECRET_KEY
value: "TheBlackDogBarksAtNoon"
########## CHATBOT SECTION #############
- name: CHATBOT_ENABLED #If CHATBOT is set to False, the other variables in this section are not needed.
value: "False" #Set to True to enable a LLAMA3 chatbot - Requires the AIDemo to be deployed first
- name: PXBBQ_URI
value: "http://EXTERNAL_PXBBQ_URL_GOES_HERE" #MUST Be the external svc name for the PXBBQ application (PXBBQ NodePort/LoadBalaner)
- name: MODEL_SERVER_URI
value: "http://ollama.genai.svc.cluster.local:11434" #MUST be the internal svc name for the ollama service (CLUSERIP)
- name: NEO4J_URI
value: "bolt://database.genai.svc.cluster.local:7687" #MUST be the internal svc name for the new4j service (CLUSTERIP)
- name: NEO4J_USERNAME
value: "neo4j"
- name: NEO4J_PASSWORD
value: "password"
############# CI/CD Demo Section ##############
#- name: ARCHIVE_ORDERS
# value: "False" #USED FOR CI/CD Database testing demos. Setting this to TRUE Wipes out all previous orders

imagePullPolicy: IfNotPresent
ports:
- containerPort: 8080
livenessProbe:
httpGet:
path: /healthz # Health check built into PXBBQ
port: 8080
#initialDelaySeconds: 15
timeoutSeconds: 5
failureThreshold: 3
readinessProbe:
httpGet:
path: /healthz # Health check built into PXBBQ
port: 8080
initialDelaySeconds: 15
timeoutSeconds: 3
periodSeconds: 10
failureThreshold: 1
tolerations:
- key: "node.kubernetes.io/unreachable"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 10
- key: "node.kubernetes.io/not-ready"
operator: "Exists"
effect: "NoExecute"
tolerationSeconds: 10
terminationGracePeriodSeconds: 0