Repository navigation
Document PostgreSQL CA certificate setup #687
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
Changes from 5 commits
ee0309e
4e4cb4b
72730aa
c4da090
df9c492
6f17b56
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -9,7 +9,7 @@ author: kagent.dev | |||||
|
|
||||||
| ## In-place upgrade blockers | ||||||
|
|
||||||
| Each of the following independent changes rules out `helm upgrade`, so working around any one of them does not help. | ||||||
| Review the following changes between 0.10.x and 1.0 before you continue. Each change prevents an in-place upgrade with `helm upgrade` on its own, so a workaround for one change does not help. | ||||||
|
|
||||||
| | Change | Consequence | | ||||||
| | ------ | ----------- | | ||||||
|
|
@@ -40,11 +40,11 @@ The two releases also cannot run side by side on one cluster. The group rename s | |||||
| --file=kagent-0.10-backup.dump | ||||||
| ``` | ||||||
|
|
||||||
| 5. Install [`yq`](https://github.com/mikefarah/yq#install) version 4 or later. The steps in [Resources that carry forward](#resources-that-carry-forward) use `yq` to convert the exported resources. | ||||||
| 5. Install [`yq`](https://github.com/mikefarah/yq#install) version 4 or later. The steps in [Resources that you can convert](#resources-that-you-can-convert) use `yq` to convert the exported resources. | ||||||
|
|
||||||
| ## Export your 0.10.x resources | ||||||
|
|
||||||
| Your Kubernetes resources do carry forward, so export them before anything replaces the CRDs. Conversation history does not carry forward. | ||||||
| Export your resources before anything replaces the CRDs. Some resources convert to 1.0, and the rest serve as a reference when you write their 1.0 replacements. 1.0 cannot read the conversation history of 0.10.x. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
|
||||||
| 1. Export every kagent resource in your namespace. | ||||||
| ```bash | ||||||
|
|
@@ -159,9 +159,9 @@ Before you start, complete the [Before you begin]({{< link path="setup/installat | |||||
|
|
||||||
| ## Recreate your resources | ||||||
|
|
||||||
| The export splits into resources that carry forward with small changes, agents that need rewriting, and resources that do not have a 1.0 equivalent. Because an AgentTemplate refers to the ModelConfigs and RemoteMCPServers that you recreate in [Resources that carry forward](#resources-that-carry-forward), work through the groups in that order. | ||||||
| The export splits into resources that convert with small changes, agents that need rewriting, and resources that do not have a 1.0 equivalent. Because an AgentTemplate refers to the ModelConfigs and RemoteMCPServers that you recreate in [Resources that you can convert](#resources-that-you-can-convert), work through the groups in that order. | ||||||
|
|
||||||
| ### Resources that carry forward | ||||||
| ### Resources that you can convert {#resources-that-you-can-convert} | ||||||
|
|
||||||
| ModelConfig, ModelProviderConfig, and RemoteMCPServer keep most of the fields that `v1alpha2` sets. `v1alpha3` renames the ModelConfig field `apiKeyPassthrough` to `tokenPassthrough`, and the field's behavior does not change. `v1alpha3` removes the following ModelConfig fields. When a resource sets any of them, the API server rejects the resource and reports the field as unknown. | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -7,9 +7,9 @@ author: kagent.dev | |||||
|
|
||||||
| An installation of {{< reuse "kagent-docs/snippets/name-product.md" >}} consists of five Helm releases. Upgrade the releases in the order that you installed them, starting with the CRDs, then Agent Substrate, and then the kagent control plane. | ||||||
|
|
||||||
| Upgrade through each minor version in order, and do not skip a minor version. For example, to move from 1.0.x to 1.2.0, upgrade to 1.1.0 first, and then to 1.2.0. Within a minor version, you can upgrade directly to any later patch release, such as from 1.0.0 to 1.0.2. To move a 0.10.x installation to 1.x, see [Upgrade from 0.x]({{< link path="operations/upgrade-from-0x" >}}) instead. | ||||||
| Upgrade from one stable release to the next, and do not skip a stable release. Before you move to the next stable release, upgrade to the latest patch release of your current stable release. Patch releases do not change the database schema, so you can upgrade directly to the latest patch release without the patch releases in between. To move a 0.10.x installation to 1.x, see [Upgrade from 0.x]({{< link path="operations/upgrade-from-0x" >}}) instead. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. just as a comment: stable and latest is not what we use in calver. If they apply calver, we would need to change this to LTS |
||||||
|
|
||||||
| <!-- REVIEW: kagent is moving from semantic versioning to calendar versioning. The release-order examples in the preceding paragraph, the version variables in "Prepare to upgrade", and the release-order rule itself assume semver. Rewrite them when the calendar version format is published. --> | ||||||
| <!-- REVIEW: kagent is moving from semantic versioning to calendar versioning. The release-order rule in the preceding paragraph follows the stable-release model that OSS and enterprise share and names no version format. Add version examples, and define a stable release, when the calendar version format is published. The version variables in "Prepare to upgrade" assume semver. --> | ||||||
|
|
||||||
| ## Prepare to upgrade | ||||||
|
|
||||||
|
|
@@ -49,7 +49,7 @@ Complete every step in this section before you change any release. The steps mak | |||||
| ``` | ||||||
| For an installation that you exported from the kagent CLI, the `kagent-values.yaml` file contains your model provider API key in plain text. Store the files securely. | ||||||
|
|
||||||
| 6. Save the target versions in environment variables. The following values are the versions that this documentation describes. To upgrade through an intermediate minor version first, set the versions of that release. | ||||||
| 6. Save the target versions in environment variables. The following values are the versions that this documentation describes. To upgrade through an intermediate stable release first, set the versions of that release. | ||||||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To upgrade through an intermediate stable release first, set the versions of that release. what is the intermediate stable release? |
||||||
| ```bash | ||||||
| export KAGENT_VERSION={{< reuse "kagent-docs/versions/kagent.md" >}} | ||||||
| export SUBSTRATE_VERSION={{< reuse "kagent-docs/versions/agent-substrate-chart.md" >}} | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -280,6 +280,29 @@ kagent and Agent Substrate each connect with an owner login, which applies migra | |
| kubectl create secret generic substrate-postgres-readwrite -n ate-system \ | ||
| --from-literal=readWriteConnectionString="postgresql://substrate_readwrite_user:${SUBSTRATE_READWRITE_PASSWORD}@<host>:5432/kagent?sslmode=verify-full" | ||
| ``` | ||
| The `sslmode=verify-full` setting makes each component verify the server certificate of the database against a root certificate. How you provide that root certificate depends on the certificate authority (CA) that signed the server certificate. | ||
| * For a publicly trusted CA, add `sslrootcert=system` to each connection string. Each component then verifies the server certificate against the root certificates in its container image. | ||
| * For a private CA, such as the Amazon RDS CA, kagent reads the CA certificate from a file that you mount on the controller. Agent Substrate cannot mount a CA file in this release, so the Agent Substrate connection strings cannot verify a server certificate that a private CA signed. | ||
| <!-- REVIEW: Agent Substrate chart gap, tracked in https://github.com/kagent-dev/substrate/issues/125. Replace the preceding sentence with the procedure when the chart can mount a CA file. --> | ||
| 1. Store the CA certificate in a Secret. | ||
| ```bash | ||
| kubectl create secret generic kagent-postgres-ca -n kagent \ | ||
| --from-file=ca.crt=<path-to-ca-certificate> | ||
| ``` | ||
| 2. Add `sslrootcert=/run/postgres-ca/ca.crt` to both kagent connection strings. | ||
| 3. When you [install kagent](#install-kagent-helm), add the following values to the command. | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. explain what this does. |
||
| ```yaml | ||
| controller: | ||
| volumes: | ||
| - name: postgres-ca | ||
| secret: | ||
| secretName: kagent-postgres-ca | ||
| volumeMounts: | ||
| - name: postgres-ca | ||
| mountPath: /run/postgres-ca | ||
| readOnly: true | ||
| ``` | ||
|
|
||
| For the other database settings, such as the connection pool and the `pgvector` extension that [long-term memory]({{< link path="agents/agent-memory" >}}) needs, see [Use an external PostgreSQL instance]({{< link path="operations/operational-considerations#use-an-external-postgresql-instance" >}}). | ||
|
|
||
| ### Install Agent Substrate | ||
|
|
||
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.
I don't understand the second sentence