-
Notifications
You must be signed in to change notification settings - Fork 3
Publish Addon #11
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
Publish Addon #11
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8a21355
add helm chart for addon
tnthornton ac7d1eb
add crossplane.yaml
tnthornton 1ba9ab3
import helm.mk and add helpful targets
tnthornton a964841
mount up-config for auth with marketplace
tnthornton 236e404
add instructions for creating up-config secret
tnthornton 556aba1
allow merge_queue
tnthornton d26ba30
don't skip merge_group
tnthornton 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
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,9 @@ | ||
| apiVersion: v2 | ||
| name: marketplace-mcp-server | ||
| description: A Helm chart for Upbound's Marketplace MCP Server | ||
|
|
||
| type: application | ||
|
|
||
| version: 0.1.0 | ||
|
|
||
| appVersion: "1.16.0" |
62 changes: 62 additions & 0 deletions
62
cluster/charts/marketplace-mcp-server/templates/_helpers.tpl
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,62 @@ | ||
| {{/* | ||
| Expand the name of the chart. | ||
| */}} | ||
| {{- define "marketplace-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 "marketplace-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 "marketplace-mcp-server.chart" -}} | ||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Common labels | ||
| */}} | ||
| {{- define "marketplace-mcp-server.labels" -}} | ||
| helm.sh/chart: {{ include "marketplace-mcp-server.chart" . }} | ||
| {{ include "marketplace-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 "marketplace-mcp-server.selectorLabels" -}} | ||
| app.kubernetes.io/name: {{ include "marketplace-mcp-server.name" . }} | ||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||
| {{- end }} | ||
|
|
||
| {{/* | ||
| Create the name of the service account to use | ||
| */}} | ||
| {{- define "marketplace-mcp-server.serviceAccountName" -}} | ||
| {{- if .Values.serviceAccount.create }} | ||
| {{- default (include "marketplace-mcp-server.fullname" .) .Values.serviceAccount.name }} | ||
| {{- else }} | ||
| {{- default "default" .Values.serviceAccount.name }} | ||
| {{- end }} | ||
| {{- end }} |
45 changes: 45 additions & 0 deletions
45
cluster/charts/marketplace-mcp-server/templates/deploymentruntimeconfig.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,45 @@ | ||
| apiVersion: pkg.crossplane.io/v1beta1 | ||
| kind: DeploymentRuntimeConfig | ||
| metadata: | ||
| name: marketplace-mcp | ||
| spec: | ||
| serviceAccountTemplate: | ||
| metadata: | ||
| # We need to provide additional permissions to the function. In order to | ||
| # do that we create a deterministic ServiceAccount name. | ||
| name: {{ .Values.serviceAccount.name }} | ||
| deploymentTemplate: | ||
| spec: | ||
| selector: {} | ||
| template: | ||
| spec: | ||
| containers: | ||
| - name: package-runtime | ||
| args: | ||
| {{- with .Values.extraArgs.packageRuntime }} | ||
| {{- toYaml . | nindent 12 }} | ||
| {{- end }} | ||
| env: | ||
| # Inform the function of the CTP1 MCP Server. | ||
| # transport: http-stream indicates that we'll communicate with the | ||
| # MCP server over StreamableHTTP. | ||
| - name: MCP_SERVER_TOOL_CTP1_TRANSPORT | ||
| value: http-stream | ||
| # baseURL indicates which address and endpoint to reach out to for | ||
| # tooling. | ||
| - name: MCP_SERVER_TOOL_CTP1_BASEURL | ||
| value: http://localhost:8765/mcp | ||
| - name: marketplace-mcp-server | ||
| image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default (ternary .Chart.AppVersion (printf "v%s" .Chart.AppVersion) (hasPrefix "v" .Chart.AppVersion)) }}" | ||
| args: | ||
| {{- with .Values.extraArgs.controlplaneMcpServer }} | ||
| {{- toYaml . | nindent 12 }} | ||
| {{- end }} | ||
| volumeMounts: | ||
| - mountPath: /mcp/.up/ | ||
| name: up-config | ||
| readOnly: true | ||
| volumes: | ||
| - name: up-config | ||
| secret: | ||
| secretName: {{ .Values.upConfig.secretName }} |
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,25 @@ | ||
| image: | ||
| repository: xpkg.upbound.io/upbound/marketplace-mcp-server-http | ||
| # Overrides the image tag whose default is the chart appVersion. | ||
| tag: "" | ||
|
|
||
| # This section builds out the service account more information can be found here: https://kubernetes.io/docs/concepts/security/service-accounts/ | ||
| serviceAccount: | ||
| # The name of the service account to use. | ||
| name: function-with-marketplace-mcp | ||
|
|
||
| # ExtraArgs to specify for the given container. | ||
| extraArgs: | ||
| # packageRuntime is the name of the crossplane function. | ||
| # example | ||
| # packageRuntime: | ||
| # - --debug | ||
| packageRuntime: [] | ||
| # marketplaceMcpServer is the name of the marketplace-mcp-server sidecar. | ||
| # example | ||
| # marketplaceMcpServer: | ||
| # - --debug | ||
| marketplaceMcpServer: [] | ||
|
|
||
| upConfig: | ||
| secretName: up-config | ||
tnthornton marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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,14 @@ | ||
| apiVersion: meta.pkg.upbound.io/v1beta1 | ||
| kind: AddOn | ||
| metadata: | ||
| annotations: | ||
| friendly-name.meta.crossplane.io: AddOn Marketplace MCP Server | ||
| meta.crossplane.io/description: | | ||
| Upbound AddOn package that deploys a DeploymentRuntimeConfig including | ||
| the marketplace-mcp-server for use by an Upbound Intelligent Function. | ||
| meta.crossplane.io/maintainer: Upbound Maintainers <info@upbound.io> | ||
| name: marketplace-mcp-server | ||
| spec: | ||
| packagingType: Helm | ||
| helm: | ||
| releaseName: marketplace-mcp-server |
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.
any reason we pushing to Chartmuseum? Can we use oci via xpkg ?
Uh oh!
There was an error while loading. Please reload this page.
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.
We shouldn't be pushing to chart museum - there's no creds for it. The build submodule will error without that though.
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.