-
Notifications
You must be signed in to change notification settings - Fork 165
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
docs: Added Advanced installation with Argo CD doc #3335
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for docs-kargo-io ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3335 +/- ##
=======================================
Coverage 52.47% 52.47%
=======================================
Files 291 291
Lines 26617 26617
=======================================
Hits 13968 13968
Misses 11886 11886
Partials 763 763 ☔ View full report in Codecov by Sentry. |
docs/docs/60-new-docs/40-operator-guide/20-advanced-installation/20-advanced-with-argocd.md
Outdated
Show resolved
Hide resolved
docs/docs/60-new-docs/40-operator-guide/20-advanced-installation/20-advanced-with-argocd.md
Outdated
Show resolved
Hide resolved
docs/docs/60-new-docs/40-operator-guide/20-advanced-installation/20-advanced-with-argocd.md
Outdated
Show resolved
Hide resolved
docs/docs/60-new-docs/40-operator-guide/20-advanced-installation/20-advanced-with-argocd.md
Outdated
Show resolved
Hide resolved
docs/docs/60-new-docs/40-operator-guide/20-advanced-installation/20-advanced-with-argocd.md
Outdated
Show resolved
Hide resolved
docs/docs/60-new-docs/40-operator-guide/20-advanced-installation/20-advanced-with-argocd.md
Outdated
Show resolved
Hide resolved
docs/docs/60-new-docs/40-operator-guide/20-advanced-installation/20-advanced-with-argocd.md
Show resolved
Hide resolved
docs/docs/60-new-docs/40-operator-guide/20-advanced-installation/20-advanced-with-argocd.md
Outdated
Show resolved
Hide resolved
docs/docs/60-new-docs/40-operator-guide/20-advanced-installation/20-advanced-with-argocd.md
Outdated
Show resolved
Hide resolved
docs/docs/60-new-docs/40-operator-guide/20-advanced-installation/20-advanced-with-argocd.md
Outdated
Show resolved
Hide resolved
💯 I am supportive of this decision to make the prereqs their own responsibility. The reasons you cite are the same reasons that the Kargo chart doesn't use cert-manager or argo-cd charts as subcharts. Those two dependencies are extremely likely to already exist in a (non-local) cluster and even if they don't, I don't think anyone would want to couple their installation and configuration to their Kargo install instead of just managing them separately. |
docs/docs/60-new-docs/40-operator-guide/20-advanced-installation/20-advanced-with-argocd.md
Outdated
Show resolved
Hide resolved
Signed-off-by: Christian Hernandez <christian@chernand.io>
…on/20-advanced-with-argocd.md Co-authored-by: Faeka Ansari <faeka6@gmail.com>
Signed-off-by: Christian Hernandez <christian@chernand.io>
…on/20-advanced-with-argocd.md Taking out "Advanced" Co-authored-by: Kent Rancourt <kent.rancourt@gmail.com>
…on/20-advanced-with-argocd.md Co-authored-by: Kent Rancourt <kent.rancourt@gmail.com>
…on/20-advanced-with-argocd.md Co-authored-by: Kent Rancourt <kent.rancourt@gmail.com>
…on/20-advanced-with-argocd.md Co-authored-by: Kent Rancourt <kent.rancourt@gmail.com>
Signed-off-by: Christian Hernandez <christian@chernand.io>
Signed-off-by: Christian Hernandez <christian@chernand.io>
Signed-off-by: Christian Hernandez <christian@chernand.io>
04f60b7
to
e333a9b
Compare
@christianh814 fyi, I had to rebase this to make it mergeable to main. So if you do anything more to it, delete your local branch first and re-pull it from here. |
Signed-off-by: Christian Hernandez <christian@chernand.io>
@krancour Ready for re-review |
:::note | ||
This section assumes that you have already installed any dependencies or prerequisites required for running Kargo on a Kubernetes cluster. Please refer to [Basic Installation](../../operator-guide/basic-installation#prerequisites) for more details. | ||
::: | ||
|
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.
All methods described here will involve deploying Kargo using an Argo CD | |
`Application` resource that is configured to obtain Kargo's Helm chart directly | |
from its official repo. We will demonstrate a variety of ways to specify | |
your own configuration values using `api.adminAccount.passwordHash` and `api.adminAccount.tokenSigningKey` as examples since you are _required_ to | |
provide values for these anyway (unless | |
[the admin account is disabled instead](../40-security/10-secure-configuration.md#disabling-the-admin-account)). | |
Recommended commands for generating a complex password and signing key, and for hashing the password as required are: | |
```console | |
pass=$(openssl rand -base64 48 | tr -d "=+/" | head -c 32) | |
echo "Password: $pass" | |
echo "Password Hash: $(htpasswd -bnBC 10 "" $pass | tr -d ':\n')" | |
echo "Signing Key: $(openssl rand -base64 48 | tr -d "=+/" | head -c 32)" | |
``` | |
:::note | |
Methods of securing the admin account are explored in greater detail [here](../40-security/10-secure-configuration.md#securing-the-admin-account). | |
::: | |
|
||
## Direct Argo CD Application | ||
|
||
The most common way to deploy Kargo using Argo CD is to create an `Application` and use the Helm chart directly. Using this method, you can use the `.spec.source.helm.parameters` section to specify any parameters you may need. This is the most straightforward way to deploy Kargo using Argo CD. |
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.
The most common way to deploy Kargo using Argo CD is to create an `Application` and use the Helm chart directly. Using this method, you can use the `.spec.source.helm.parameters` section to specify any parameters you may need. This is the most straightforward way to deploy Kargo using Argo CD. | |
The most straightforward way to specify chart configuration options is by using the | |
`Application`'s `spec.source.helm.parameters` field: |
helm: | ||
parameters: | ||
- name: api.adminAccount.passwordHash | ||
value: "$$2a$$10$$Zrhhie4vLz5ygtVSaif6o.qN36jgs6vjtMBdM6yrU1FOeiAAMMxOm" |
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.
There's too much danger of someone blindly using the example password -- it's only admin
. I'll make another suggestion up above with instructions for generating a password.
value: "$$2a$$10$$Zrhhie4vLz5ygtVSaif6o.qN36jgs6vjtMBdM6yrU1FOeiAAMMxOm" | |
# Note: A bcrypt-hashed password will contain `$` characters that | |
# MUST each be escaped as `$$` | |
value: <bcrypt-hashed password> |
- name: api.adminAccount.tokenTTL | ||
value: "24h" | ||
- name: api.adminAccount.tokenSigningKey | ||
value: "iwishtowashmyirishwristwatch" |
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.
Similar comment to this one
value: "iwishtowashmyirishwristwatch" | |
value: <token signing key> |
- name: controller.logLevel | ||
value: "DEBUG" | ||
- name: api.adminAccount.tokenTTL | ||
value: "24h" |
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.
- name: controller.logLevel | |
value: "DEBUG" | |
- name: api.adminAccount.tokenTTL | |
value: "24h" |
:::info | ||
If using the `api.adminAccount.passwordHash` parameter in this method, you must escape the `$` character with `$$` to prevent Helm from interpreting it as a variable. Please see [this discussion](https://discord.com/channels/1138942074998235187/1138946346217394407/1267966083168469102) for more information. | ||
::: |
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.
A previous suggestion puts this in a comment directly above where it's relevant so it
can't be missed.
:::info | |
If using the `api.adminAccount.passwordHash` parameter in this method, you must escape the `$` character with `$$` to prevent Helm from interpreting it as a variable. Please see [this discussion](https://discord.com/channels/1138942074998235187/1138946346217394407/1267966083168469102) for more information. | |
::: |
If using the `api.adminAccount.passwordHash` parameter in this method, you must escape the `$` character with `$$` to prevent Helm from interpreting it as a variable. Please see [this discussion](https://discord.com/channels/1138942074998235187/1138946346217394407/1267966083168469102) for more information. | ||
::: | ||
|
||
Conversely, insetad of using the `parameters` field under the `.spec.source.helm` section; you can use the `values` block or `valuesObject` object to specify the values for the Kargo Helm chart. Below is an example of how to use `valuesObject` to specify the values. |
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.
Conversely == opposite, which is probably not the right idea here.
Conversely, insetad of using the `parameters` field under the `.spec.source.helm` section; you can use the `values` block or `valuesObject` object to specify the values for the Kargo Helm chart. Below is an example of how to use `valuesObject` to specify the values. | |
## `spec.source.helm.values` | |
Alternatively, instead of using `spec.source.helm`'s `parameters` field, you can use the either of the `values` or `valuesObject` fields to specify configuration options for the chart: |
Conversely, insetad of using the `parameters` field under the `.spec.source.helm` section; you can use the `values` block or `valuesObject` object to specify the values for the Kargo Helm chart. Below is an example of how to use `valuesObject` to specify the values. | ||
|
||
```yaml | ||
--- |
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.
--- |
|
||
The `parametes` section isn't used in this method, instead the `values.yaml` file is hosted in a separate repository and is referenced using the `ref` field. | ||
|
||
## What's Next? | ||
|
||
Now that you have deployed Kargo using Argo CD, you can explore the various features and capabilities of Kargo. Please see the [Operator Guide](../../operator-guide/) or the [User Guide](../../user-guide/) for futher information. |
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.
The `parametes` section isn't used in this method, instead the `values.yaml` file is hosted in a separate repository and is referenced using the `ref` field. | |
## What's Next? | |
Now that you have deployed Kargo using Argo CD, you can explore the various features and capabilities of Kargo. Please see the [Operator Guide](../../operator-guide/) or the [User Guide](../../user-guide/) for futher information. |
passwordHash: $2a$10$Zrhhie4vLz5ygtVSaif6o.qN36jgs6vjtMBdM6yrU1FOeiAAMMxOm | ||
tokenSigningKey: iwishtowashmyirishwristwatch |
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.
passwordHash: $2a$10$Zrhhie4vLz5ygtVSaif6o.qN36jgs6vjtMBdM6yrU1FOeiAAMMxOm | |
tokenSigningKey: iwishtowashmyirishwristwatch | |
passwordHash: <bcrypt-hashed password> | |
tokenSigningKey: <token signing key> |
|
||
## Multi-Source Argo CD Application | ||
|
||
Another method is to use a Multi-Source Argo CD Application. Here, you'd use the `.spec.sources` field and store your values files in a separate repository. This is useful if you are using GitOps to track your values configuration changes, but will still use the public Helm chart repository. |
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.
Another method is to use a Multi-Source Argo CD Application. Here, you'd use the `.spec.sources` field and store your values files in a separate repository. This is useful if you are using GitOps to track your values configuration changes, but will still use the public Helm chart repository. | |
__Our recommended method__ is to use an `Application` with | |
[multiple sources](https://argo-cd.readthedocs.io/en/stable/user-guide/multiple_sources/) to reference _both_ the Kargo Helm chart repository a `values.yaml` | |
of your own from your own Git repository. | |
__This is our recommendation because it aligns best with with GitOps principles.__ |
:::info | ||
We recommend using this method as it more closely aligns with GitOps principles and best practices. | ||
::: |
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.
Factored into text higher up.
:::info | |
We recommend using this method as it more closely aligns with GitOps principles and best practices. | |
::: |
::: | ||
|
||
```yaml | ||
--- |
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.
--- |
:::info | ||
We recommend using this method as it more closely aligns with GitOps principles and best practices. | ||
::: | ||
|
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.
In the configuration below, the second source (the one with `repoURL` pointed at your own Git repository) is assigned a `ref` of `values`. This permits content from that | |
repository (in particular, a `values.yaml` file) to be referenced by the _other_ source: | |
This section assumes that you have already installed any dependencies or prerequisites required for running Kargo on a Kubernetes cluster. Please refer to [Basic Installation](../../operator-guide/basic-installation#prerequisites) for more details. | ||
::: | ||
|
||
## Direct Argo CD Application |
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.
## Direct Argo CD Application | |
## `spec.source.helm.parameters` |
Added different ways to deploy Kargo using Argo CD. I stuck with the 3 main ways folks would do this using Argo CD. I stayed away from Umbrella Charts as I feel folks would manage
cert-manager
andargo-rollouts
with their own Argo CDApplication
. (also I think having a "Kargo + Cert Manager + Argo Rollouts" Umbrella chart would be bad practice)