Skip to content

Instantly share code, notes, and snippets.

@nickform-ost
Created September 18, 2020 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nickform-ost/06c5ba6024ccf1773f97cb443d03fc80 to your computer and use it in GitHub Desktop.
Save nickform-ost/06c5ba6024ccf1773f97cb443d03fc80 to your computer and use it in GitHub Desktop.
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: rdfox-stateful-set
spec:
selector:
matchLabels:
app: rdfox-app
serviceName: "rdfox-set"
replicas: 3
template:
metadata:
labels:
app: rdfox-app
spec:
containers:
- name: rdfox
image: oxfordsemantic/rdfox:3.1.1
args: ['-license-file', '/license/RDFox.lic', 'daemon']
ports:
- name: rdfox-endpoint
containerPort: 12110
protocol: TCP
volumeMounts:
- name: license
mountPath: "/license"
readOnly: true
- name: server-directory
mountPath: "/home/rdfox/.RDFox"
initContainers:
- name: init-server-directory
image: oxfordsemantic/rdfox-init:3.1.1
env:
- name: RDFOX_ROLE
valueFrom:
secretKeyRef:
name: first-role-credentials
key: rolename
- name: RDFOX_PASSWORD
valueFrom:
secretKeyRef:
name: first-role-credentials
key: password
- name: RDFOX_LICENSE_CONTENT
valueFrom:
secretKeyRef:
name: rdfox-license
key: RDFox.lic
volumeMounts:
- name: shell-root-directory
mountPath: "/data"
readOnly: true
- name: server-directory
mountPath: "/home/rdfox/.RDFox"
volumes:
- name: license
secret:
secretName: rdfox-license
items:
- key: RDFox.lic
path: RDFox.lic
- name: shell-root-directory
persistentVolumeClaim:
claimName: family-init-vol-claim
volumeClaimTemplates:
- metadata:
name: server-directory
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: "gp2"
resources:
requests:
storage: 1Gi
@rppala3
Copy link

rppala3 commented Jun 27, 2023

Hi,

I'm trying to deploy this file on an internal kubernetes cluster, but I'm facing this error:
persistentvolumeclaim "family-init-vol-claim" not found.

Note: my file is the basically the same, I just had to comment the line 70 out and add the resources quotas for the containers.

@nickform-ost
Copy link
Author

Hi @rppala3. Thanks for reading.

I'm not sure how you got here but this gist was created to support this article. The family-init-vol-claim is a pre-prepared pvc that contains data and scripts to initialize the server directories. It's mentioned in the article in the following paragraph:

We will also use a pre-populated Elastic File System (EFS) volume containing the data to be loaded into each replica during the initialisation stage.

It's contents are also described in a little bit more detail later in the article.

Things have moved on since that article was published though and RDFox now supports high-availability for read/write services. If you'd like to know more, please contact us at info@oxfordsemantic.tech and reference this post.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment