Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Management of external ontologies #520

Merged
merged 1 commit into from
Mar 19, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions helm/airgap-deployment/prepare-airgap.bash
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,4 @@ wget -O- https://github.com/strimzi/strimzi-kafka-operator/releases/download/${S
( cd ${OFFLINE_DIR} && rm -rf emqx-operator && git clone https://github.com/emqx/emqx-operator.git && cd emqx-operator && git checkout ${EMQX_OPERATOR_VERSION} )
( cd ${OFFLINE_DIR} && rm -rf postgres-operator && git clone https://github.com/zalando/postgres-operator.git && cd postgres-operator && git checkout ${POSTGRES_OPERATOR_VERSION} )
( cd ${OFFLINE_DIR} && rm -rf helm-charts && git clone https://github.com/vmware-tanzu/helm-charts.git && cd helm-charts && git checkout ${VELERO_HELM_VERSION})
( cd ${OFFLINE_DIR} && rm -rf Reloader && git clone https://github.com/stakater/Reloader.git && cd Reloader && git checkout ${RELOADER_HELM_VERSION})
1 change: 0 additions & 1 deletion helm/charts/kafka-bridges/kms

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,5 @@ spec:
items:
- key: "config.json"
path: "config.json"
- key: "knowledge.ttl"
path: "knowledge.ttl"
imagePullSecrets:
- name: {{ .Values.pullSecretCredentials }}
3 changes: 1 addition & 2 deletions helm/charts/kafka-bridges/templates/bridge-configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,4 @@ data:
"password": "POSTGRES_PASSWORD"
}
}
knowledge.ttl: |
{{ .Files.Get "kms/knowledge.ttl" | indent 4 }}

Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ metadata:
namespace: {{ .Release.Namespace }}
labels:
app: debezium-bridge
annotations:
configmap.reloader.stakater.com/reload: "knowledge"
spec:
replicas: {{ .Values.kafkaBridge.debezium.replicaCount }}
selector:
Expand Down Expand Up @@ -45,19 +47,20 @@ spec:
initialDelaySeconds: 5
volumeMounts:
- name: config
mountPath: /opt/config
mountPath: /opt/config/config.json
readOnly: true
subPath: config.json
- name: knowledge-config
mountPath: /opt/config/knowledge.ttl
subPath: knowledge.ttl
readOnly: true
resources:
volumes:
- name: config
configMap:
# Provide the name of the ConfigMap you want to mount.
name: bridge-configmap
# An array of keys from the ConfigMap to create as files
items:
- key: "config.json"
path: "config.json"
- key: "knowledge.ttl"
path: "knowledge.ttl"
- name: knowledge-config
configMap:
name: knowledge
imagePullSecrets:
- name: {{ .Values.pullSecretCredentials }}
30 changes: 30 additions & 0 deletions helm/charts/kafka-bridges/templates/knowledge-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
# yamllint disable rule:line-length
# yamllint disable rule:braces
apiVersion: v1
kind: ConfigMap
metadata:
name: knowledge
namespace: {{ .Release.Namespace }}
labels:
app: knowledge
data:
{{- $configmap := (lookup "v1" "ConfigMap" .Release.Namespace "knowledge") }}
{{- if $configmap }}
{{- $knowledge := get $configmap.data "knowledge.ttl" }}
knowledge.ttl: {{ $knowledge | quote }}
{{- else }}
knowledge.ttl: |
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX iff: <https://industry-fusion.com/types/v0.9/>
PREFIX oee: <https://industry-fusion.com/oee/v0.9/>
PREFIX owl: <http://www.w3.org/2002/07/owl#>

### Test classes
iff:cutter_test rdfs:subClassOf iff:machine_test ;
a rdfs:Class .
iff:plasmacutter_test rdfs:subClassOf iff:cutter_test ;
a rdfs:Class .
### End of Test Content
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,5 @@ spec:
items:
- key: "config.json"
path: "config.json"
- key: "knowledge.ttl"
path: "knowledge.ttl"
imagePullSecrets:
- name: {{ .Values.pullSecretCredentials }}
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,5 @@ spec:
items:
- key: "config.json"
path: "config.json"
- key: "knowledge.ttl"
path: "knowledge.ttl"
imagePullSecrets:
- name: {{ .Values.pullSecretCredentials }}
6 changes: 5 additions & 1 deletion helm/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,8 @@ db:
clusterSvcPostfix: cluster
svcPort: "5432"
dbUser: "ngb"
oispdbUser: "oisp"
oispdbUser: "oisp"

ontology:
baseUri: https://industryfusion.github.io/contexts/staging/ontology/v0.1/

1 change: 1 addition & 0 deletions helm/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export STRIMZI_VERSION="0.32.0"
export OFFLINE=${OFFLINE:-false}
export OFFLINE_DIR=$(cd $DIRNAME/airgap-deployment; pwd)
export KEYCLOAK_VERSION=21.1.2
export RELOADER_HELM_VERSION=v1.0.67
COMMON_MAIN_REGISTRY=$(yq ".mainRegistry" < $DIRNAME/common.yaml)
COMMON_EXTERNAL_REGISTRY=$(yq ".externalRegistry" < $DIRNAME/common.yaml)
COMMON_EXTERNAL_REGISTRY2=$(yq ".externalRegistry2" < $DIRNAME/common.yaml)
Expand Down
14 changes: 14 additions & 0 deletions helm/install_operators.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,25 @@ fi
sleep 10
done


printf "\n"
printf "\033[1mInstalling Reloader Operator\n"
printf -- "------------------------\033[0m\n"
if [ "$OFFLINE" = "true" ]; then
( cd ${OFFLINE_DIR}/Reloader && helm upgrade --install --atomic reloader ./deployments/kubernetes/chart/reloader \
--set reloader.image.name=${REGISTRY}/stakater/reloader --set reloader.reloadOnCreate=true)
else
helm repo add stakater https://stakater.github.io/stakater-charts
helm repo update
helm upgrade --install reloader stakater/reloader --version ${RELOADER_HELM_VERSION} --set reloader.reloadOnCreate=true
fi

printf "\n"
printf "\033[1mPrepare Velero Helm Chart Repo\n"
printf -- "------------------------\033[0m\n"

if [ ! "$OFFLINE" = "true" ]; then
( cd ${OFFLINE_DIR} && rm -rf helm-charts && git clone https://github.com/vmware-tanzu/helm-charts.git && cd helm-charts && git checkout ${VELERO_HELM_VERSION} )
fi

printf -- "\033[1mOperators installed successfully.\033[0m\n"
Loading
Loading