From 58f96c8828d4535f293e0a0450557866a79f1b2e Mon Sep 17 00:00:00 2001 From: Ludovic Muller Date: Wed, 31 Jul 2024 18:44:49 +0200 Subject: [PATCH 1/8] ci: build dependencies for blueprint chart --- .github/workflows/lint.yaml | 4 ++++ .github/workflows/release.yaml | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 9d61c95..2d18095 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -19,6 +19,10 @@ jobs: env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + - name: Install Helm dependencies + run: | + helm dependency build zazuko/blueprint + - name: Lint Helm Charts run: | helm lint zazuko/* diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 8710cb1..ed005da 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -26,6 +26,10 @@ jobs: - name: Install Helm uses: azure/setup-helm@v4 + - name: Install Helm dependencies + run: | + helm dependency build zazuko/blueprint + - name: Run helm-docs uses: losisin/helm-docs-github-action@v1.3.0 with: From a65fcfa8a623822eb7f18e8563977e56396cdad1 Mon Sep 17 00:00:00 2001 From: Ludovic Muller Date: Wed, 31 Jul 2024 18:56:57 +0200 Subject: [PATCH 2/8] blueprint: start chart creation --- zazuko/blueprint/.helmignore | 23 ++++ zazuko/blueprint/Chart.lock | 9 ++ zazuko/blueprint/Chart.yaml | 46 +++++++ zazuko/blueprint/templates/NOTES.txt | 5 + zazuko/blueprint/templates/_helpers.tpl | 62 ++++++++++ zazuko/blueprint/templates/deployment.yaml | 68 +++++++++++ zazuko/blueprint/templates/hpa.yaml | 32 +++++ zazuko/blueprint/templates/ingress.yaml | 61 ++++++++++ zazuko/blueprint/templates/service.yaml | 15 +++ .../blueprint/templates/serviceaccount.yaml | 13 ++ .../templates/tests/test-connection.yaml | 15 +++ zazuko/blueprint/values.yaml | 113 ++++++++++++++++++ 12 files changed, 462 insertions(+) create mode 100644 zazuko/blueprint/.helmignore create mode 100644 zazuko/blueprint/Chart.lock create mode 100644 zazuko/blueprint/Chart.yaml create mode 100644 zazuko/blueprint/templates/NOTES.txt create mode 100644 zazuko/blueprint/templates/_helpers.tpl create mode 100644 zazuko/blueprint/templates/deployment.yaml create mode 100644 zazuko/blueprint/templates/hpa.yaml create mode 100644 zazuko/blueprint/templates/ingress.yaml create mode 100644 zazuko/blueprint/templates/service.yaml create mode 100644 zazuko/blueprint/templates/serviceaccount.yaml create mode 100644 zazuko/blueprint/templates/tests/test-connection.yaml create mode 100644 zazuko/blueprint/values.yaml diff --git a/zazuko/blueprint/.helmignore b/zazuko/blueprint/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/zazuko/blueprint/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/zazuko/blueprint/Chart.lock b/zazuko/blueprint/Chart.lock new file mode 100644 index 0000000..889e6be --- /dev/null +++ b/zazuko/blueprint/Chart.lock @@ -0,0 +1,9 @@ +dependencies: +- name: trifid + repository: https://charts.zazuko.com + version: 0.1.6 +- name: fuseki + repository: https://charts.zazuko.com + version: 0.0.4 +digest: sha256:74e2b8d12c4a072eeb7a8490f034feb67e36ae9fbc2e30c05c6afd6144213a38 +generated: "2024-07-31T17:44:12.63028+02:00" diff --git a/zazuko/blueprint/Chart.yaml b/zazuko/blueprint/Chart.yaml new file mode 100644 index 0000000..c3e6f41 --- /dev/null +++ b/zazuko/blueprint/Chart.yaml @@ -0,0 +1,46 @@ +apiVersion: v2 +name: blueprint +description: Zazuko Blueprint is an enterprise knowledge graph frontend and browser, designed to make RDF Knowledge Graphs accessible and customizable for domain users +home: https://github.com/zazuko/blueprint +icon: https://charts.zazuko.com/icons/logo-blueprint.svg + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.0.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +# It is recommended to use it with quotes. +appVersion: "sha256:5f634605926c878094d3c740fb49bd8f73aa489a5fa34a0579bdf0260fc4f7c5" + +annotations: + artifacthub.io/license: Apache-2.0 + artifacthub.io/links: | + - name: Chart Source + url: https://github.com/zazuko/helm-charts/tree/main/zazuko/blueprint + - name: GitHub Repository + url: https://github.com/zazuko/blueprint + - name: Zazuko + url: https://www.zazuko.com/ + - name: support + url: https://github.com/zazuko/helm-charts/issues + +dependencies: + - name: trifid + version: 0.1.7 + repository: "https://charts.zazuko.com" + - name: fuseki + version: 0.0.5 + repository: "https://charts.zazuko.com" diff --git a/zazuko/blueprint/templates/NOTES.txt b/zazuko/blueprint/templates/NOTES.txt new file mode 100644 index 0000000..bfefe59 --- /dev/null +++ b/zazuko/blueprint/templates/NOTES.txt @@ -0,0 +1,5 @@ +Thanks for using our Helm Chart! + +To report any issue: +- about the Helm Chart: https://github.com/zazuko/helm-charts +- about Zazuko Blueprint itself: https://github.com/zazuko/blueprint diff --git a/zazuko/blueprint/templates/_helpers.tpl b/zazuko/blueprint/templates/_helpers.tpl new file mode 100644 index 0000000..eba7555 --- /dev/null +++ b/zazuko/blueprint/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "blueprint.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "blueprint.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "blueprint.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "blueprint.labels" -}} +helm.sh/chart: {{ include "blueprint.chart" . }} +{{ include "blueprint.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "blueprint.selectorLabels" -}} +app.kubernetes.io/name: {{ include "blueprint.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "blueprint.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "blueprint.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/zazuko/blueprint/templates/deployment.yaml b/zazuko/blueprint/templates/deployment.yaml new file mode 100644 index 0000000..0757bbc --- /dev/null +++ b/zazuko/blueprint/templates/deployment.yaml @@ -0,0 +1,68 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "blueprint.fullname" . }} + labels: + {{- include "blueprint.labels" . | nindent 4 }} +spec: + {{- if not .Values.autoscaling.enabled }} + replicas: {{ .Values.replicaCount }} + {{- end }} + selector: + matchLabels: + {{- include "blueprint.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "blueprint.labels" . | nindent 8 }} + {{- with .Values.podLabels }} + {{- toYaml . | nindent 8 }} + {{- end }} + spec: + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + serviceAccountName: {{ include "blueprint.serviceAccountName" . }} + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - name: http + containerPort: {{ .Values.service.port }} + protocol: TCP + livenessProbe: + {{- toYaml .Values.livenessProbe | nindent 12 }} + readinessProbe: + {{- toYaml .Values.readinessProbe | nindent 12 }} + resources: + {{- toYaml .Values.resources | nindent 12 }} + {{- with .Values.volumeMounts }} + volumeMounts: + {{- toYaml . | nindent 12 }} + {{- end }} + {{- with .Values.volumes }} + volumes: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} diff --git a/zazuko/blueprint/templates/hpa.yaml b/zazuko/blueprint/templates/hpa.yaml new file mode 100644 index 0000000..39524f2 --- /dev/null +++ b/zazuko/blueprint/templates/hpa.yaml @@ -0,0 +1,32 @@ +{{- if .Values.autoscaling.enabled }} +apiVersion: autoscaling/v2 +kind: HorizontalPodAutoscaler +metadata: + name: {{ include "blueprint.fullname" . }} + labels: + {{- include "blueprint.labels" . | nindent 4 }} +spec: + scaleTargetRef: + apiVersion: apps/v1 + kind: Deployment + name: {{ include "blueprint.fullname" . }} + minReplicas: {{ .Values.autoscaling.minReplicas }} + maxReplicas: {{ .Values.autoscaling.maxReplicas }} + metrics: + {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} + - type: Resource + resource: + name: cpu + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} + {{- end }} + {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} + - type: Resource + resource: + name: memory + target: + type: Utilization + averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} + {{- end }} +{{- end }} diff --git a/zazuko/blueprint/templates/ingress.yaml b/zazuko/blueprint/templates/ingress.yaml new file mode 100644 index 0000000..057191a --- /dev/null +++ b/zazuko/blueprint/templates/ingress.yaml @@ -0,0 +1,61 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "blueprint.fullname" . -}} +{{- $svcPort := .Values.service.port -}} +{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }} + {{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }} + {{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}} + {{- end }} +{{- end }} +{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1 +{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}} +apiVersion: networking.k8s.io/v1beta1 +{{- else -}} +apiVersion: extensions/v1beta1 +{{- end }} +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + {{- include "blueprint.labels" . | nindent 4 }} + {{- with .Values.ingress.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +spec: + {{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }} + ingressClassName: {{ .Values.ingress.className }} + {{- end }} + {{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . | quote }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} + {{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .host | quote }} + http: + paths: + {{- range .paths }} + - path: {{ .path }} + {{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }} + pathType: {{ .pathType }} + {{- end }} + backend: + {{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }} + service: + name: {{ $fullName }} + port: + number: {{ $svcPort }} + {{- else }} + serviceName: {{ $fullName }} + servicePort: {{ $svcPort }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} diff --git a/zazuko/blueprint/templates/service.yaml b/zazuko/blueprint/templates/service.yaml new file mode 100644 index 0000000..f7b1009 --- /dev/null +++ b/zazuko/blueprint/templates/service.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "blueprint.fullname" . }} + labels: + {{- include "blueprint.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + name: http + selector: + {{- include "blueprint.selectorLabels" . | nindent 4 }} diff --git a/zazuko/blueprint/templates/serviceaccount.yaml b/zazuko/blueprint/templates/serviceaccount.yaml new file mode 100644 index 0000000..e607f05 --- /dev/null +++ b/zazuko/blueprint/templates/serviceaccount.yaml @@ -0,0 +1,13 @@ +{{- if .Values.serviceAccount.create -}} +apiVersion: v1 +kind: ServiceAccount +metadata: + name: {{ include "blueprint.serviceAccountName" . }} + labels: + {{- include "blueprint.labels" . | nindent 4 }} + {{- with .Values.serviceAccount.annotations }} + annotations: + {{- toYaml . | nindent 4 }} + {{- end }} +automountServiceAccountToken: {{ .Values.serviceAccount.automount }} +{{- end }} diff --git a/zazuko/blueprint/templates/tests/test-connection.yaml b/zazuko/blueprint/templates/tests/test-connection.yaml new file mode 100644 index 0000000..fed06bf --- /dev/null +++ b/zazuko/blueprint/templates/tests/test-connection.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: Pod +metadata: + name: "{{ include "blueprint.fullname" . }}-test-connection" + labels: + {{- include "blueprint.labels" . | nindent 4 }} + annotations: + "helm.sh/hook": test +spec: + containers: + - name: wget + image: busybox + command: ['wget'] + args: ['{{ include "blueprint.fullname" . }}:{{ .Values.service.port }}'] + restartPolicy: Never diff --git a/zazuko/blueprint/values.yaml b/zazuko/blueprint/values.yaml new file mode 100644 index 0000000..1e9af95 --- /dev/null +++ b/zazuko/blueprint/values.yaml @@ -0,0 +1,113 @@ +trifid: + enabled: false + +fuseki: + enabled: false + +replicaCount: 1 + +image: + repository: nginx + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: "" + +imagePullSecrets: [] +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Automatically mount a ServiceAccount's API credentials? + automount: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "" + +podAnnotations: {} +podLabels: {} + +podSecurityContext: + {} + # fsGroup: 2000 + +securityContext: + {} + # capabilities: + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +ingress: + enabled: false + className: "" + annotations: + {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + hosts: + - host: chart-example.local + paths: + - path: / + pathType: ImplementationSpecific + tls: [] + # - secretName: chart-example-tls + # hosts: + # - chart-example.local + +resources: + {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +livenessProbe: + httpGet: + path: / + port: http +readinessProbe: + httpGet: + path: / + port: http + +autoscaling: + enabled: false + minReplicas: 1 + maxReplicas: 100 + targetCPUUtilizationPercentage: 80 + # targetMemoryUtilizationPercentage: 80 + +# Additional volumes on the output Deployment definition. +volumes: [] +# - name: foo +# secret: +# secretName: mysecret +# optional: false + +# Additional volumeMounts on the output Deployment definition. +volumeMounts: [] +# - name: foo +# mountPath: "/etc/foo" +# readOnly: true + +nodeSelector: {} + +tolerations: [] + +affinity: {} From 99c256d66d3f0f986a71ddc9f3a4c21a25f10213 Mon Sep 17 00:00:00 2001 From: Ludovic Muller Date: Wed, 7 Aug 2024 08:19:20 +0200 Subject: [PATCH 3/8] blueprint: configure specific fields --- zazuko/blueprint/Chart.lock | 8 +- zazuko/blueprint/Chart.yaml | 2 + zazuko/blueprint/templates/deployment.yaml | 16 ++ zazuko/blueprint/values.yaml | 210 ++++++++++++++++++--- 4 files changed, 202 insertions(+), 34 deletions(-) diff --git a/zazuko/blueprint/Chart.lock b/zazuko/blueprint/Chart.lock index 889e6be..4ae3d14 100644 --- a/zazuko/blueprint/Chart.lock +++ b/zazuko/blueprint/Chart.lock @@ -1,9 +1,9 @@ dependencies: - name: trifid repository: https://charts.zazuko.com - version: 0.1.6 + version: 0.1.7 - name: fuseki repository: https://charts.zazuko.com - version: 0.0.4 -digest: sha256:74e2b8d12c4a072eeb7a8490f034feb67e36ae9fbc2e30c05c6afd6144213a38 -generated: "2024-07-31T17:44:12.63028+02:00" + version: 0.0.5 +digest: sha256:c53e7d417387e0c60f562ff68aba7814241e21de134783637cb380b042f88c6d +generated: "2024-07-31T19:56:19.405208+02:00" diff --git a/zazuko/blueprint/Chart.yaml b/zazuko/blueprint/Chart.yaml index c3e6f41..87f47bf 100644 --- a/zazuko/blueprint/Chart.yaml +++ b/zazuko/blueprint/Chart.yaml @@ -41,6 +41,8 @@ dependencies: - name: trifid version: 0.1.7 repository: "https://charts.zazuko.com" + condition: trifid.enabled - name: fuseki version: 0.0.5 repository: "https://charts.zazuko.com" + condition: fuseki.enabled diff --git a/zazuko/blueprint/templates/deployment.yaml b/zazuko/blueprint/templates/deployment.yaml index 0757bbc..3fe14f3 100644 --- a/zazuko/blueprint/templates/deployment.yaml +++ b/zazuko/blueprint/templates/deployment.yaml @@ -50,6 +50,22 @@ spec: volumeMounts: {{- toYaml . | nindent 12 }} {{- end }} + env: + - name: ENDPOINT_URL + value: {{ .Values.endpointUrl | quote }} + - name: SPARQL_CONSOLE_URL + value: {{ .Values.sparqlConsoleUrl | quote }} + - name: GRAPH_EXPLORER_URL + value: {{ .Values.graphExplorerUrl | quote }} + - name: FULL_TEXT_SEARCH_DIALECT + value: {{ .Values.fullTextSearchDialect | quote }} + {{- if .Values.fullTextSearchDialect }} + - name: NEPTUNE_FTS_ENDPOINT + value: {{ .Values.neptuneFtsEndpoint | quote }} + {{- end }} + {{- with .Values.extraEnv }} + {{- toYaml . | nindent 12 }} + {{- end }} {{- with .Values.volumes }} volumes: {{- toYaml . | nindent 8 }} diff --git a/zazuko/blueprint/values.yaml b/zazuko/blueprint/values.yaml index 1e9af95..8ae26a2 100644 --- a/zazuko/blueprint/values.yaml +++ b/zazuko/blueprint/values.yaml @@ -1,69 +1,207 @@ +# Blueprint configuration + +## In case you want to use Trifid and Fuseki, you can enable them with `trifid.enabled` and `fuseki.enabled` set to `true`. +## Replace `example.com` in the `endpointUrl`, `sparqlConsoleUrl` and `graphExplorerUrl` fields with the exposed URL of your Trifid instance (see `trifid.ingress` section). + +# -- endpointUrl is the SPARQL endpoint URL +endpointUrl: http://example.com/query +# -- sparqlConsoleUrl is the SPARQL console URL +sparqlConsoleUrl: http://example.com/sparql/#query +# -- graphExplorerUrl is the Graph Explorer URL +graphExplorerUrl: http://example.com/graph-explorer/?resource +# -- fullTextSearchDialect is the full text search dialect +fullTextSearchDialect: fuseki +# -- neptuneFtsEndpoint (in case fullTextSearchDialect is "neptune") is the Neptune FTS endpoint +neptuneFtsEndpoint: "" + +# Trifid configuration trifid: - enabled: false + # -- enabled tells if a Trifid instance should be deployed + enabled: true + + # Information about the SPARQL endpoint + sparql: + # -- endpoint is the URL of the SPARQL endpoint (required) + endpoint: "http://blueprint-fuseki:3030/query" + # -- username for the SPARQL endpoint + username: "" + # -- password for the SPARQL endpoint + password: "" + + # Changes to the Trifid configuration + config: + # -- file is the path to the Trifid configuration file + file: "" + + # Set the base URL for the dataset, to allow some rewriting features + dataset: + # -- baseUrl is the base URL for the dataset + baseUrl: "" + + # Ingress configuration + ingress: + # -- enabled allows you to enable or disable the Ingress + enabled: true + # -- className is the ingress class to use + className: "" + # -- annotations to add to the Ingress + annotations: + {} + # kubernetes.io/ingress.class: nginx + # kubernetes.io/tls-acme: "true" + # -- hosts is the list of hostnames to be exposed + hosts: + [] + # - host: trifid-example.local + # paths: + # - path: / + # pathType: ImplementationSpecific + # -- tls is the list of TLS configuration + tls: [] + # - secretName: trifid-example-tls + # hosts: + # - trifid-example.local + + # More fields can be added here, see the Trifid values.yaml for more options +# Fuseki configuration fuseki: - enabled: false + # -- enabled tells if a Fuseki instance should be deployed + enabled: true + + # Configuration + config: + # -- adminPassword is the password for the admin user + adminPassword: super-secret-password + # -- javaOpts is the Java options to use + javaOpts: "-Xmx2048m -Xms2048m" + # -- disableOtel tells if OpenTelemetry should be disabled + disableOtel: true + + # Storage configuration (for persistent storage) + storage: + # -- enabled tells if the storage should be enabled + enabled: true + # -- size is the size of the storage to use + size: 10Gi + # -- storageClass is the storage class to use + storageClass: "" + # -- accessMode is the access mode to use + accessMode: ReadWriteOnce + # -- existingClaim is the name of an existing PVC to use + existingClaim: "" + # -- mountPath is the path to mount the storage + mountPath: /fuseki/databases/ds/ + + # -- fullnameOverride overrides the full name of the chart + ## Make sure that this is unique within the namespace + ## If you are using the embedded Trifid, you should also update the `trifid.sparql.endpoint` field + fullnameOverride: "blueprint-fuseki" + + # More fields can be added here, see the Fuseki values.yaml for more options +# -- replicaCount is the number of replicas to deploy replicaCount: 1 +# Information about the Blueprint Docker image to use. +# In case you want to use a custom image, you can set the repository and tag here. image: - repository: nginx + # -- repository is the Docker image to use + repository: ghcr.io/zazuko/blueprint + # -- pullPolicy is the policy to use when pulling the image pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. + # -- tag is used to overrides the image tag whose default is the chart appVersion tag: "" +# -- extraEnv is a list of extra environment variables to set +extraEnv: + [] + # - name: MY_ENV_VAR + # value: my-value + +# -- imagePullSecrets used to pull the Docker image imagePullSecrets: [] +# -- nameOverride overrides the chart name nameOverride: "" +# -- fullnameOverride overrides the full name of the chart fullnameOverride: "" +# Service account configuration serviceAccount: - # Specifies whether a service account should be created - create: true - # Automatically mount a ServiceAccount's API credentials? + # -- create tells if a service account should be created + create: false + # -- automount tells if the service account should be automounted automount: true - # Annotations to add to the service account + # -- annotations to add to the service account annotations: {} - # The name of the service account to use. - # If not set and create is true, a name is generated using the fullname template + # -- name is the name of the service account to use name: "" +# -- podAnnotations to use podAnnotations: {} +# -- podLabels to use podLabels: {} +# Pod security context configuration podSecurityContext: - {} - # fsGroup: 2000 + # -- fsGroup is the group ID to run the container as + fsGroup: 0 + # -- runAsGroup is the group ID to run the container as + runAsGroup: 0 + # -- runAsNonRoot tells if the container should run as a non-root user + runAsNonRoot: false + # -- runAsUser is the user ID to run the container as + runAsUser: 0 +# Security context configuration securityContext: - {} - # capabilities: - # drop: - # - ALL - # readOnlyRootFilesystem: true - # runAsNonRoot: true - # runAsUser: 1000 + # -- allowPrivilegeEscalation tells if the container can request to allow privilege escalation + allowPrivilegeEscalation: false + # -- capabilities to add/drop + capabilities: {} + # -- privileged tells if the container is privileged + privileged: false + # -- runAsNonRoot tells if the container should run as a non-root user + runAsNonRoot: true + # -- runAsUser is the user ID to run the container as + runAsUser: 1000 + # -- readOnlyRootFilesystem tells if the container should have a read-only root filesystem + readOnlyRootFilesystem: false + # -- seLinuxOptions to add + seLinuxOptions: {} +# Service configuration service: + # -- type is the type of service to create type: ClusterIP + # -- port is the port the service will listen on port: 80 +# Ingress configuration ingress: + # -- enabled allows you to enable or disable the Ingress enabled: false + # -- className is the ingress class to use className: "" + # -- annotations to add to the Ingress annotations: {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" + # -- hosts is the list of hostnames to be exposed hosts: - - host: chart-example.local - paths: - - path: / - pathType: ImplementationSpecific + [] + # - host: blueprint-example.local + # paths: + # - path: / + # pathType: ImplementationSpecific + # -- tls is the list of TLS configuration tls: [] - # - secretName: chart-example-tls + # - secretName: blueprint-example-tls # hosts: - # - chart-example.local + # - blueprint-example.local +# -- resources to request for the pod resources: {} # We usually recommend not to specify default resources and to leave this as a conscious @@ -77,37 +215,49 @@ resources: # cpu: 100m # memory: 128Mi +# -- livenessProbe is a health check to determine if the container is still running livenessProbe: httpGet: - path: / + path: "/" port: http + +# -- readinessProbe is a health check to determine if the container is ready to serve traffic readinessProbe: httpGet: - path: / + path: "/" port: http +# Configure autoscaling autoscaling: + # -- enabled allows you to enable or disable autoscaling enabled: false + # -- minReplicas is the minimum number of replicas that will be set when autoscaling is enabled minReplicas: 1 + # -- maxReplicas is the maximum number of replicas that will be set when autoscaling is enabled maxReplicas: 100 + # -- targetCPUUtilizationPercentage is the target average CPU utilization across all pods targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 + # -- targetMemoryUtilizationPercentage is the target average memory utilization across all pods + targetMemoryUtilizationPercentage: 80 -# Additional volumes on the output Deployment definition. +# -- volumes to mount on the output Deployment definition volumes: [] # - name: foo # secret: # secretName: mysecret # optional: false -# Additional volumeMounts on the output Deployment definition. +# -- volume mounts to use volumeMounts: [] # - name: foo # mountPath: "/etc/foo" # readOnly: true +# -- nodeSelector to use nodeSelector: {} +# -- tolerations to use tolerations: [] +# -- affinity to use affinity: {} From d2165aebecb4685e0e2b1c0621f379c877cba77b Mon Sep 17 00:00:00 2001 From: Ludovic Muller Date: Wed, 7 Aug 2024 08:23:36 +0200 Subject: [PATCH 4/8] ci: use helm dependency update --- .github/workflows/lint.yaml | 2 +- .github/workflows/release.yaml | 2 +- zazuko/blueprint/Chart.lock | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 2d18095..1934c2c 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -21,7 +21,7 @@ jobs: - name: Install Helm dependencies run: | - helm dependency build zazuko/blueprint + helm dependency update zazuko/blueprint - name: Lint Helm Charts run: | diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ed005da..e8975e3 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,7 +28,7 @@ jobs: - name: Install Helm dependencies run: | - helm dependency build zazuko/blueprint + helm dependency update zazuko/blueprint - name: Run helm-docs uses: losisin/helm-docs-github-action@v1.3.0 diff --git a/zazuko/blueprint/Chart.lock b/zazuko/blueprint/Chart.lock index 4ae3d14..58e1eff 100644 --- a/zazuko/blueprint/Chart.lock +++ b/zazuko/blueprint/Chart.lock @@ -5,5 +5,5 @@ dependencies: - name: fuseki repository: https://charts.zazuko.com version: 0.0.5 -digest: sha256:c53e7d417387e0c60f562ff68aba7814241e21de134783637cb380b042f88c6d -generated: "2024-07-31T19:56:19.405208+02:00" +digest: sha256:969373b1aaf41eb1e38722a610488abfe74bbee03af87cdd863b88c5f35947ef +generated: "2024-08-07T08:22:47.980467+02:00" From fba5676b80c1d76f54444aaa34ee4fa6f666767d Mon Sep 17 00:00:00 2001 From: Ludovic Muller Date: Wed, 7 Aug 2024 08:38:58 +0200 Subject: [PATCH 5/8] ci: iterate over all charts to install deps --- .github/workflows/lint.yaml | 5 ++++- .github/workflows/release.yaml | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 1934c2c..c31a371 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -21,7 +21,10 @@ jobs: - name: Install Helm dependencies run: | - helm dependency update zazuko/blueprint + for chart in zazuko/*; do + echo "- $chart" + helm dependency update "${chart}" + done - name: Lint Helm Charts run: | diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e8975e3..51ba890 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,7 +28,10 @@ jobs: - name: Install Helm dependencies run: | - helm dependency update zazuko/blueprint + for chart in zazuko/*; do + echo "- $chart" + helm dependency update "${chart}" + done - name: Run helm-docs uses: losisin/helm-docs-github-action@v1.3.0 From fd49b47c7ab2f100780d2e26ccaa9dce68dec4bb Mon Sep 17 00:00:00 2001 From: Ludovic Muller Date: Wed, 7 Aug 2024 11:06:08 +0200 Subject: [PATCH 6/8] ci: better formatting of logs --- .github/workflows/lint.yaml | 4 +++- .github/workflows/release.yaml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index c31a371..8904493 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -21,9 +21,11 @@ jobs: - name: Install Helm dependencies run: | + # Iterate over all charts in the zazuko directory for chart in zazuko/*; do - echo "- $chart" + echo "- ${chart}" helm dependency update "${chart}" + echo "" done - name: Lint Helm Charts diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 51ba890..948d2b8 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -28,9 +28,11 @@ jobs: - name: Install Helm dependencies run: | + # Iterate over all charts in the zazuko directory for chart in zazuko/*; do - echo "- $chart" + echo "- ${chart}" helm dependency update "${chart}" + echo "" done - name: Run helm-docs From 74ae554acba037a20b917e35c24027fbb537330f Mon Sep 17 00:00:00 2001 From: Ludovic Muller Date: Wed, 7 Aug 2024 11:11:47 +0200 Subject: [PATCH 7/8] blueprint: use v0.1.0 tag --- zazuko/blueprint/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zazuko/blueprint/Chart.yaml b/zazuko/blueprint/Chart.yaml index 87f47bf..e2486c8 100644 --- a/zazuko/blueprint/Chart.yaml +++ b/zazuko/blueprint/Chart.yaml @@ -23,7 +23,7 @@ version: 0.0.1 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "sha256:5f634605926c878094d3c740fb49bd8f73aa489a5fa34a0579bdf0260fc4f7c5" +appVersion: "v0.1.0" annotations: artifacthub.io/license: Apache-2.0 From ad7788459dc417310b81a446c824f95b1de5af0d Mon Sep 17 00:00:00 2001 From: Ludovic Muller Date: Wed, 7 Aug 2024 11:12:02 +0200 Subject: [PATCH 8/8] blueprint: improve default values --- zazuko/blueprint/values.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/zazuko/blueprint/values.yaml b/zazuko/blueprint/values.yaml index 8ae26a2..ba6457e 100644 --- a/zazuko/blueprint/values.yaml +++ b/zazuko/blueprint/values.yaml @@ -17,7 +17,7 @@ neptuneFtsEndpoint: "" # Trifid configuration trifid: # -- enabled tells if a Trifid instance should be deployed - enabled: true + enabled: false # Information about the SPARQL endpoint sparql: @@ -41,7 +41,7 @@ trifid: # Ingress configuration ingress: # -- enabled allows you to enable or disable the Ingress - enabled: true + enabled: false # -- className is the ingress class to use className: "" # -- annotations to add to the Ingress @@ -49,6 +49,8 @@ trifid: {} # kubernetes.io/ingress.class: nginx # kubernetes.io/tls-acme: "true" + + ## Make sure to configure the following fields if you enable the Ingress # -- hosts is the list of hostnames to be exposed hosts: [] @@ -67,7 +69,7 @@ trifid: # Fuseki configuration fuseki: # -- enabled tells if a Fuseki instance should be deployed - enabled: true + enabled: false # Configuration config: @@ -162,9 +164,9 @@ securityContext: # -- privileged tells if the container is privileged privileged: false # -- runAsNonRoot tells if the container should run as a non-root user - runAsNonRoot: true + runAsNonRoot: false # -- runAsUser is the user ID to run the container as - runAsUser: 1000 + runAsUser: 0 # -- readOnlyRootFilesystem tells if the container should have a read-only root filesystem readOnlyRootFilesystem: false # -- seLinuxOptions to add