Skip to content

Commit 5964733

Browse files
authored
Bump helm chart to v0.6.0 (#106)
* Bump helm chart to v0.6.0 * Add Ingress for MCP endpoint
1 parent c50e021 commit 5964733

3 files changed

Lines changed: 95 additions & 2 deletions

File tree

chart/trivy-operator-explorer/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.4.7
18+
version: 0.4.8
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to
2222
# follow Semantic Versioning. They should reflect the version the application is using.
2323
# It is recommended to use it with quotes.
24-
appVersion: "v0.5.9"
24+
appVersion: "v0.6.0"
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
{{- if .Values.mcpIngress.enabled -}}
2+
{{- $fullName := include "trivy-operator-explorer.fullname" . -}}
3+
{{- $svcPort := .Values.service.mcpPort -}}
4+
{{- if and .Values.mcpIngress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
5+
{{- if not (hasKey .Values.mcpIngress.annotations "kubernetes.io/ingress.class") }}
6+
{{- $_ := set .Values.mcpIngress.annotations "kubernetes.io/ingress.class" .Values.mcpIngress.className}}
7+
{{- end }}
8+
{{- end }}
9+
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
10+
apiVersion: networking.k8s.io/v1
11+
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
12+
apiVersion: networking.k8s.io/v1beta1
13+
{{- else -}}
14+
apiVersion: extensions/v1beta1
15+
{{- end }}
16+
kind: Ingress
17+
metadata:
18+
name: {{ $fullName }}-mcp
19+
labels:
20+
{{- include "trivy-operator-explorer.labels" . | nindent 4 }}
21+
{{- with .Values.mcpIngress.annotations }}
22+
annotations:
23+
{{- toYaml . | nindent 4 }}
24+
{{- end }}
25+
spec:
26+
{{- if and .Values.mcpIngress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
27+
ingressClassName: {{ .Values.mcpIngress.className }}
28+
{{- end }}
29+
{{- if .Values.mcpIngress.tls }}
30+
tls:
31+
{{- range .Values.mcpIngress.tls }}
32+
- hosts:
33+
{{- range .hosts }}
34+
- {{ . | quote }}
35+
{{- end }}
36+
{{- if .secretName }}
37+
secretName: {{ .secretName }}
38+
{{- end }}
39+
{{- end }}
40+
{{- end }}
41+
{{- if eq $.Values.mcpIngress.ruleType "rules" }}
42+
rules:
43+
{{- range .Values.mcpIngress.hosts }}
44+
- host: {{ .host | quote }}
45+
http:
46+
paths:
47+
{{- range .paths }}
48+
- path: {{ .path }}
49+
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
50+
pathType: {{ .pathType }}
51+
{{- end }}
52+
backend:
53+
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
54+
service:
55+
name: {{ $fullName }}
56+
port:
57+
number: {{ $svcPort }}
58+
{{- else }}
59+
serviceName: {{ $fullName }}
60+
servicePort: {{ $svcPort }}
61+
{{- end }}
62+
{{- end }}
63+
{{- end }}
64+
{{- else if eq $.Values.mcpIngress.ruleType "defaultBackend" }}
65+
defaultBackend:
66+
service:
67+
name: {{ $fullName }}
68+
port:
69+
number: {{ $svcPort }}
70+
{{- end }}
71+
{{- end }}

chart/trivy-operator-explorer/values.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,28 @@ ingress:
9696
# Switch between different Ingress rule styles. Can be one of "rules", or "defaultBackend"
9797
ruleType: "rules"
9898

99+
# Opt-in Ingress for the MCP server. Disabled by default. When enabled, this
100+
# creates a separate Ingress that routes to service.mcpPort. There is no
101+
# authentication on the MCP endpoint, so rely on network policy / ingress auth
102+
# to gate access.
103+
mcpIngress:
104+
enabled: false
105+
className: ""
106+
annotations: {}
107+
# kubernetes.io/ingress.class: nginx
108+
# kubernetes.io/tls-acme: "true"
109+
hosts:
110+
- host: mcp.chart-example.local
111+
paths:
112+
- path: /
113+
pathType: Prefix
114+
tls: []
115+
# - secretName: chart-example-mcp-tls
116+
# hosts:
117+
# - mcp.chart-example.local
118+
# Switch between different Ingress rule styles. Can be one of "rules", or "defaultBackend"
119+
ruleType: "rules"
120+
99121
resources:
100122
# Change these as needed. Larger clusters with more resources may run into issues with too low of limits.
101123
limits:

0 commit comments

Comments
 (0)