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

Fix: helm chart routing does not find openvasd #1854

Merged
merged 2 commits into from
Feb 21, 2025
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
11 changes: 5 additions & 6 deletions charts/openvasd/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
This deployment takes a while.

To verify if the rollout is complete, you can use:
$ kubectl rollout status --watch --timeout 600s deployment/openvasd
$ kubectl rollout status --watch --timeout 600s deployment/openvasd -n {{ .Release.Namespace }}

After the deployment is finished it should be available via:
{{- if .Values.routing.enabled -}}
{{- $svcPort := .Values.service.port -}}
{{- $apiKey := .Values.openvasd.apikey }}
{{- if eq .Values.openvasd.tls.certificates.deploy_server true }}
{{- if eq .Values.openvasd.tls.certificates.deploy_client true }}
$ curl -vk -x HEAD https://localhost/ --key yourclientkey.rsa --cert yourclientkey.pem
$ curl -vk -X HEAD https://localhost/ --key yourclientkey.rsa --cert yourclientkey.pem
{{- else }}
$ curl -vk -x HEAD https://localhost/ -H "X-API-KEY: {{ .apiKey }}"
$ curl -vk -X HEAD https://localhost/ -H "X-API-KEY: {{ .apiKey }}"
{{- end }}
{{- else }}
$ curl -vk -x HEAD https://localhost/ -H "X-API-KEY: {{ .apiKey }}"
$ curl -vk -X HEAD https://localhost/ -H "X-API-KEY: {{ .apiKey }}"
{{- end }}
{{- else }}
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "openvasd.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace {{ .Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit http://127.0.0.1:8080 to use your application"
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT
echo "Visit http://127.0.0.1:8080 to use your application"
{{- end }}
5 changes: 4 additions & 1 deletion charts/openvasd/templates/routing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ apiVersion: traefik.containo.us/v1alpha1
kind: IngressRouteTCP
metadata:
name: openvasd-route
namespace: openvasd
namespace: {{ .Release.Namespace }}
annotations:
"helm.sh/hook": post-install,post-upgrade
"helm.sh/hook-delete-policy": before-hook-creation
{{- if eq .Values.openvasd.tls.certificates.deploy_server true }}
spec:
entryPoints:
Expand Down
3 changes: 2 additions & 1 deletion charts/openvasd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ openvasd:
# Sets the log level and changes the verbosity of openvasd.
# Can be set to TRACE, DEBUG, INFO, WARNING, ERROR
# openvasd is provided by the openvas image
loglevel: TRACE
loglevel: DEBUG
# When set it will be the used API-KEY. It is not required when deploy_client is true.
# apikey: changeme
# can be either service: fill openvasd capabilities, service_notus: only notus
Expand Down Expand Up @@ -94,6 +94,7 @@ securityContext:

service:
type: ClusterIP
# type: LoadBalancer
port: 443

# enables routing.yaml
Expand Down
Loading