-
Notifications
You must be signed in to change notification settings - Fork 60
MCP Helm chart: Add support for Traefik ingress #120
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
befcc24
MCP Helm chart: Add support for Traefik ingress
kkhristenko51 7d73e46
Potential fix for pull request finding
kkhristenko51 d6364ef
Address review findings
kkhristenko51 e5f07c3
Potential fix for pull request finding
kkhristenko51 40c1781
Normalize middleware names
kkhristenko51 e8b5898
Update values/examples, add unit tests and CI step to run them
kkhristenko51 ddad939
Merge remote-tracking branch 'origin/main' into feat/helm-traefik-sup…
kkhristenko51 bf98b8b
Update deployment guide to reflect Traefik defaults
kkhristenko51 5245492
Potential fix for pull request finding
kkhristenko51 e39634a
Fix CRD name normalization, update app version
kkhristenko51 d7be15b
Update image tag in examples
kkhristenko51 0c54122
Potential fix for pull request finding
kkhristenko51 b01a446
Potential fix for pull request finding
kkhristenko51 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
src/helm-charts/rosetta-mcp-server/templates/traefik-middlewares.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| {{- if and .Values.ingress.enabled (eq (.Values.ingress.className | default "") "traefik") }} | ||
|
|
||
| {{- if and .Values.ingress.traefik .Values.ingress.traefik.rateLimit .Values.ingress.traefik.rateLimit.average }} | ||
| --- | ||
| apiVersion: traefik.io/v1alpha1 | ||
| kind: Middleware | ||
| metadata: | ||
| name: {{ regexReplaceAll "-{2,}" (printf "%s-rate-limit" (include "rosetta-mcp.fullname" .)) "-" }} | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| {{- include "rosetta-mcp.labels" . | nindent 4 }} | ||
| spec: | ||
| rateLimit: | ||
| average: {{ .Values.ingress.traefik.rateLimit.average }} | ||
| {{- with .Values.ingress.traefik.rateLimit.burst }} | ||
| burst: {{ . }} | ||
| {{- end }} | ||
| {{- with .Values.ingress.traefik.rateLimit.period }} | ||
| period: {{ . | quote }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
|
||
| {{- end }} |
85 changes: 85 additions & 0 deletions
85
src/helm-charts/rosetta-mcp-server/tests/deployment_test.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| suite: Deployment | ||
| templates: | ||
| - deployment.yaml | ||
| tests: | ||
| - it: creates a Deployment | ||
| asserts: | ||
| - isKind: | ||
| of: Deployment | ||
|
|
||
| - it: sets replicas from replicaCount | ||
| set: | ||
| replicaCount: 3 | ||
| asserts: | ||
| - equal: | ||
| path: spec.replicas | ||
| value: 3 | ||
|
|
||
| - it: uses the configured image | ||
| set: | ||
| image.repository: my-registry/my-app | ||
| image.tag: "1.2.3" | ||
| asserts: | ||
| - equal: | ||
| path: spec.template.spec.containers[0].image | ||
| value: "my-registry/my-app:1.2.3" | ||
|
|
||
| - it: defaults image tag to Chart.appVersion when tag is not set | ||
| asserts: | ||
| - matchRegex: | ||
| path: spec.template.spec.containers[0].image | ||
| pattern: "^griddynamics/rosetta-mcp:.+" | ||
|
|
||
| - it: applies pod security context | ||
| asserts: | ||
| - equal: | ||
| path: spec.template.spec.securityContext.runAsNonRoot | ||
| value: true | ||
| - equal: | ||
| path: spec.template.spec.securityContext.runAsUser | ||
| value: 1000 | ||
|
|
||
| - it: applies container security context | ||
| asserts: | ||
| - equal: | ||
| path: spec.template.spec.containers[0].securityContext.allowPrivilegeEscalation | ||
| value: false | ||
| - contains: | ||
| path: spec.template.spec.containers[0].securityContext.capabilities.drop | ||
| content: ALL | ||
|
|
||
| - it: sets resource requests and limits | ||
| asserts: | ||
| - equal: | ||
| path: spec.template.spec.containers[0].resources.requests.cpu | ||
| value: 250m | ||
| - equal: | ||
| path: spec.template.spec.containers[0].resources.requests.memory | ||
| value: 512Mi | ||
| - equal: | ||
| path: spec.template.spec.containers[0].resources.limits.cpu | ||
| value: 1000m | ||
| - equal: | ||
| path: spec.template.spec.containers[0].resources.limits.memory | ||
| value: 1Gi | ||
|
|
||
| - it: configures rolling update strategy | ||
| asserts: | ||
| - equal: | ||
| path: spec.strategy.type | ||
| value: RollingUpdate | ||
| - equal: | ||
| path: spec.strategy.rollingUpdate.maxSurge | ||
| value: 1 | ||
| - equal: | ||
| path: spec.strategy.rollingUpdate.maxUnavailable | ||
| value: 0 | ||
|
|
||
| - it: renders liveness and readiness probes | ||
| asserts: | ||
| - isNotNull: | ||
| path: spec.template.spec.containers[0].livenessProbe | ||
| - isNotNull: | ||
| path: spec.template.spec.containers[0].readinessProbe | ||
| - isNotNull: | ||
| path: spec.template.spec.containers[0].startupProbe |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.