-
Notifications
You must be signed in to change notification settings - Fork 172
Added Helm chart #440
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
Open
sabre1041
wants to merge
1
commit into
containers:main
Choose a base branch
from
sabre1041:helm-chart
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+513
−0
Open
Added Helm chart #440
Changes from all commits
Commits
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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/ |
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,13 @@ | ||
| apiVersion: v2 | ||
| name: kubernetes-mcp-server | ||
| description: Helm Chart for the Kubernetes MCP Server | ||
| home: https://github.com/containers/kubernetes-mcp-server | ||
| keywords: | ||
| - kubernetes | ||
| - mcp | ||
| maintainers: | ||
| - name: Andrew Block | ||
| email: ablock@redhat.com | ||
| - name: Marc Nuri | ||
| email: marc.nuri@redhat.com | ||
| version: 0.1.0 |
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,76 @@ | ||
| # kubernetes-mcp-server | ||
|
|
||
|  | ||
|
|
||
| Helm Chart for the Kubernetes MCP Server | ||
|
|
||
| **Homepage:** <https://github.com/containers/kubernetes-mcp-server> | ||
|
|
||
| ## Maintainers | ||
|
|
||
| | Name | Email | Url | | ||
| | ---- | ------ | --- | | ||
| | Andrew Block | <ablock@redhat.com> | | | ||
| | Marc Nuri | <marc.nuri@redhat.com> | | | ||
|
|
||
| ## Installing the Chart | ||
|
|
||
| The Chart can be installed quickly and easily to a Kubernetes cluster. Since an _Ingress_ is added as part of the default install of the Chart, the `ingress.host` Value must be specified. | ||
|
|
||
| Install the Chart using the following command from the root of this directory: | ||
|
|
||
| ```shell | ||
| helm upgrade -i -n kubernetes-mcp-server --create-namespace kubernetes-mcp-server . --set openshift=true --set ingress.host=<hostname> | ||
| ``` | ||
|
|
||
| ### Optimized OpenShift Deployment | ||
|
|
||
| Functionality has bee added to the Chart to simplify the deployment to OpenShift Cluster. | ||
|
|
||
| ## Values | ||
|
|
||
| | Key | Type | Default | Description | | ||
| |-----|------|---------|-------------| | ||
| | affinity | object | `{}` | | | ||
| | config.port | string | `"{{ .Values.service.port }}"` | | | ||
| | configFilePath | string | `"/etc/kubernetes-mcp-server/config.toml"` | | | ||
| | defaultPodSecurityContext | object | `{"seccompProfile":{"type":"RuntimeDefault"}}` | Default Security Context for the Pod when one is not provided | | ||
| | defaultSecurityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"runAsNonRoot":true}` | Default Security Context for the Container when one is not provided | | ||
| | extraVolumeMounts | list | `[]` | Additional volumeMounts on the output Deployment definition. | | ||
| | extraVolumes | list | `[]` | Additional volumes on the output Deployment definition. | | ||
| | fullnameOverride | string | `""` | | | ||
| | image | object | `{"pullPolicy":"IfNotPresent","registry":"quay.io","repository":"manusa/kubernetes_mcp_server","version":"latest"}` | This sets the container image more information can be found here: https://kubernetes.io/docs/concepts/containers/images/ | | ||
| | image.pullPolicy | string | `"IfNotPresent"` | This sets the pull policy for images. | | ||
| | image.version | string | `"latest"` | This sets the tag or sha digest for the image. | | ||
| | imagePullSecrets | list | `[]` | This is for the secrets for pulling an image from a private repository more information can be found here: https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/ | | ||
| | ingress | object | `{"annotations":{},"className":"","enabled":true,"host":"","hosts":null,"path":"/","pathType":"ImplementationSpecific","termination":"edge","tls":null}` | This block is for setting up the ingress for more information can be found here: https://kubernetes.io/docs/concepts/services-networking/ingress/ | | ||
| | livenessProbe | object | `{"httpGet":{"path":"/healthz","port":"http"}}` | Liveness and readiness probes for the container. | | ||
| | nameOverride | string | `""` | | | ||
| | nodeSelector | object | `{}` | | | ||
| | openshift | bool | `false` | Enable OpenShift specific features | | ||
| | podAnnotations | object | `{}` | For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/annotations/ | | ||
| | podLabels | object | `{}` | For more information checkout: https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/ | | ||
| | podSecurityContext | object | `{}` | Define the Security Context for the Pod | | ||
| | readinessProbe.httpGet.path | string | `"/healthz"` | | | ||
| | readinessProbe.httpGet.port | string | `"http"` | | | ||
| | replicaCount | int | `1` | This will set the replicaset count more information can be found here: https://kubernetes.io/docs/concepts/workloads/controllers/replicaset/ | | ||
| | resources | object | `{"limits":{"cpu":"100m","memory":"128Mi"},"requests":{"cpu":"100m","memory":"128Mi"}}` | Resource requests and limits for the container. | | ||
| | securityContext | object | `{}` | Define the Security Context for the Container | | ||
| | service | object | `{"port":8080,"type":"ClusterIP"}` | This is for setting up a service more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/ | | ||
| | service.port | int | `8080` | This sets the ports more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#field-spec-ports | | ||
| | service.type | string | `"ClusterIP"` | This sets the service type more information can be found here: https://kubernetes.io/docs/concepts/services-networking/service/#publishing-services-service-types | | ||
| | serviceAccount | object | `{"annotations":{},"create":true,"name":""}` | This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ | | ||
| | serviceAccount.annotations | object | `{}` | Annotations to add to the service account | | ||
| | serviceAccount.create | bool | `true` | Specifies whether a service account should be created | | ||
| | serviceAccount.name | string | `""` | If not set and create is true, a name is generated using the fullname template | | ||
| | tolerations | list | `[]` | | | ||
|
|
||
| ## Updating the README | ||
|
|
||
| The contents of the README.md file is generated using [helm-docs](https://github.com/norwoodj/helm-docs). Whenever changes are introduced to the Chart and its _Values_, the documentation should be regenerated. | ||
|
|
||
| Execute the following command to regenerate the documentation from within the Helm Chart directory. | ||
|
|
||
| ```shell | ||
| helm-docs -t README.md.gotpl | ||
| ``` |
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,40 @@ | ||
| {{ template "chart.header" . }} | ||
| {{ template "chart.deprecationWarning" . }} | ||
|
|
||
| {{ template "chart.badgesSection" . }} | ||
|
|
||
| {{ template "chart.description" . }} | ||
|
|
||
| {{ template "chart.homepageLine" . }} | ||
|
|
||
| {{ template "chart.maintainersSection" . }} | ||
|
|
||
| {{ template "chart.sourcesSection" . }} | ||
|
|
||
| {{ template "chart.requirementsSection" . }} | ||
|
|
||
| ## Installing the Chart | ||
|
|
||
| The Chart can be installed quickly and easily to a Kubernetes cluster. Since an _Ingress_ is added as part of the default install of the Chart, the `ingress.host` Value must be specified. | ||
|
|
||
| Install the Chart using the following command from the root of this directory: | ||
|
|
||
| ```shell | ||
| helm upgrade -i -n kubernetes-mcp-server --create-namespace kubernetes-mcp-server . --set openshift=true --set ingress.host=<hostname> | ||
| ``` | ||
|
|
||
| ### Optimized OpenShift Deployment | ||
|
|
||
| Functionality has bee added to the Chart to simplify the deployment to OpenShift Cluster. | ||
|
|
||
| {{ template "chart.valuesSection" . }} | ||
|
|
||
| ## Updating the README | ||
|
|
||
| The contents of the README.md file is generated using [helm-docs](https://github.com/norwoodj/helm-docs). Whenever changes are introduced to the Chart and its _Values_, the documentation should be regenerated. | ||
|
|
||
| Execute the following command to regenerate the documentation from within the Helm Chart directory. | ||
|
|
||
| ```shell | ||
| helm-docs -t README.md.gotpl | ||
| ``` |
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,73 @@ | ||
| {{/* | ||
| Expand the name of the chart. | ||
| */}} | ||
| {{- define "kubernetes-mcp-server.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 "kubernetes-mcp-server.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 "kubernetes-mcp-server.chart" -}} | ||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Common labels | ||
| */}} | ||
| {{- define "kubernetes-mcp-server.labels" -}} | ||
| helm.sh/chart: {{ include "kubernetes-mcp-server.chart" . }} | ||
| {{ include "kubernetes-mcp-server.selectorLabels" . }} | ||
| {{- if .Chart.AppVersion }} | ||
| app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
| {{- end }} | ||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Selector labels | ||
| */}} | ||
| {{- define "kubernetes-mcp-server.selectorLabels" -}} | ||
| app.kubernetes.io/name: {{ include "kubernetes-mcp-server.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create the name of the service account to use | ||
| */}} | ||
| {{- define "kubernetes-mcp-server.serviceAccountName" -}} | ||
| {{- if .Values.serviceAccount.create }} | ||
| {{- default (include "kubernetes-mcp-server.fullname" .) .Values.serviceAccount.name }} | ||
| {{- else }} | ||
| {{- default "default" .Values.serviceAccount.name }} | ||
| {{- end }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create the image path for the passed in image field | ||
| */}} | ||
| {{- define "kubernetes-mcp-server.image" -}} | ||
| {{- if eq (substr 0 7 .version) "sha256:" -}} | ||
| {{- printf "%s/%s@%s" .registry .repository .version -}} | ||
| {{- else -}} | ||
| {{- printf "%s/%s:%s" .registry .repository .version -}} | ||
| {{- end -}} | ||
| {{- end -}} |
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,10 @@ | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: {{ include "kubernetes-mcp-server.fullname" . }} | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| {{- include "kubernetes-mcp-server.labels" . | nindent 4 }} | ||
| data: | ||
| config.toml: | | ||
| {{- tpl (toToml .Values.config) . | replace ".0" "" | nindent 4 }} |
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 @@ | ||
| apiVersion: apps/v1 | ||
| kind: Deployment | ||
| metadata: | ||
| name: {{ include "kubernetes-mcp-server.fullname" . }} | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| {{- include "kubernetes-mcp-server.labels" . | nindent 4 }} | ||
| spec: | ||
| replicas: {{ .Values.replicaCount }} | ||
| selector: | ||
| matchLabels: | ||
| {{- include "kubernetes-mcp-server.selectorLabels" . | nindent 6 }} | ||
| template: | ||
| metadata: | ||
| annotations: | ||
| checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }} | ||
| {{- with .Values.podAnnotations }} | ||
| {{- tpl (toYaml .) . | nindent 8 }} | ||
| {{- end }} | ||
| labels: | ||
| {{- include "kubernetes-mcp-server.labels" . | nindent 8 }} | ||
| {{- with .Values.podLabels }} | ||
| {{- tpl (toYaml .) . | nindent 8 }} | ||
| {{- end }} | ||
| spec: | ||
| {{- with .Values.imagePullSecrets }} | ||
| imagePullSecrets: | ||
| {{- tpl (toYaml .) . | nindent 8 }} | ||
| {{- end }} | ||
| serviceAccountName: {{ include "kubernetes-mcp-server.serviceAccountName" . }} | ||
| securityContext: | ||
| {{- tpl (toYaml (default .Values.defaultPodSecurityContext .Values.podSecurityContext)) . | nindent 8 }} | ||
| containers: | ||
| - name: {{ .Chart.Name }} | ||
| securityContext: | ||
| {{- tpl (toYaml (default .Values.defaultSecurityContext .Values.securityContext)) . | nindent 12 }} | ||
| image: "{{ template "kubernetes-mcp-server.image" .Values.image }}" | ||
| imagePullPolicy: {{ .Values.image.pullPolicy }} | ||
| ports: | ||
| - name: http | ||
| containerPort: {{ .Values.service.port }} | ||
| protocol: TCP | ||
| args: | ||
| - "--config" | ||
| - "{{ .Values.configFilePath }}" | ||
| {{- with .Values.livenessProbe }} | ||
| livenessProbe: | ||
| {{- tpl (toYaml .) . | nindent 12 }} | ||
| {{- end }} | ||
| {{- with .Values.readinessProbe }} | ||
| readinessProbe: | ||
| {{- tpl (toYaml .) . | nindent 12 }} | ||
| {{- end }} | ||
| {{- with .Values.resources }} | ||
| resources: | ||
| {{- tpl (toYaml .) . | nindent 12 }} | ||
| {{- end }} | ||
| volumeMounts: | ||
| - name: config | ||
| mountPath: {{ .Values.configFilePath | dir }} | ||
| {{- with .Values.extraVolumeMounts }} | ||
| {{- tpl (toYaml .) . | nindent 12 }} | ||
| {{- end }} | ||
| {{- with .Values.extraVolumeMounts }} | ||
| {{- tpl (toYaml .) . | nindent 12 }} | ||
| {{- end }} | ||
| volumes: | ||
| - name: config | ||
| configMap: | ||
| name: {{ include "kubernetes-mcp-server.fullname" . }} | ||
| {{- with .Values.extraVolumes }} | ||
| {{- tpl (toYaml .) . | nindent 8 }} | ||
| {{- end }} | ||
| {{- with .Values.nodeSelector }} | ||
| nodeSelector: | ||
| {{- tpl (toYaml .) . | nindent 8 }} | ||
| {{- end }} | ||
| {{- with .Values.affinity }} | ||
| affinity: | ||
| {{- tpl (toYaml .) . | nindent 8 }} | ||
| {{- end }} | ||
| {{- with .Values.tolerations }} | ||
| tolerations: | ||
| {{- tpl (toYaml .) . | nindent 8 }} | ||
| {{- end }} | ||
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,38 @@ | ||
| {{- if .Values.ingress.enabled -}} | ||
| {{- $host := required "Ingress hostname must be specified" (tpl .Values.ingress.host .) }} | ||
| apiVersion: networking.k8s.io/v1 | ||
| kind: Ingress | ||
| metadata: | ||
| name: {{ include "kubernetes-mcp-server.fullname" . }} | ||
| namespace: {{ .Release.Namespace }} | ||
| labels: | ||
| {{- include "kubernetes-mcp-server.labels" . | nindent 4 }} | ||
| annotations: | ||
| {{- if eq .Values.openshift true }} | ||
| route.openshift.io/termination: {{ .Values.ingress.termination }} | ||
| {{- end }} | ||
| {{- with .Values.ingress.annotations }} | ||
| {{- toYaml . | nindent 4 }} | ||
| {{- end }} | ||
| spec: | ||
| {{- with .Values.ingress.className }} | ||
| ingressClassName: {{ . }} | ||
| {{- end }} | ||
| {{- if .Values.ingress.tls }} | ||
| tls: | ||
| - hosts: | ||
| - "{{ $host }}" | ||
| secretName: {{ .Values.ingress.tls.secretName }} | ||
| {{- end }} | ||
| rules: | ||
| - host: "{{ $host }}" | ||
| http: | ||
| paths: | ||
| - path: {{ .Values.ingress.path }} | ||
| pathType: {{ .Values.ingress.pathType }} | ||
| backend: | ||
| service: | ||
| name: {{ include "kubernetes-mcp-server.fullname" $ }} | ||
| port: | ||
| number: {{ $.Values.service.port }} | ||
| {{- end }} |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this seems duplicated