-
Notifications
You must be signed in to change notification settings - Fork 29
update description of privatecacert template function #3410
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 2 commits
8a1f552
e6cb4bd
4ceb4d5
25148fb
315b6f8
d349be9
73c08f9
45b65c2
1d3f2ad
8b13a47
d8bc50c
b8bd9aa
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 |
---|---|---|
|
@@ -16,12 +16,28 @@ This topic provides a list of the KOTS template functions in the Static context. | |
func PrivateCACert() string | ||
``` | ||
|
||
For KOTS installations, PrivateCACert returns the name of a ConfigMap that contains CA certificates provided by the end user with the `--private-ca-configmap` flag for the install command. For Embedded Cluster installations, the ConfigMap returned by PrivateCACert contains the CA trust store from the host. Embedded Cluster determines the CA trust store by first checking for the `SSL_CERT_FILE` environment variable. If `SSL_CERT_FILE` is not set, Embedded Cluster then searches common certificate paths and uses the first valid certificate file found. | ||
PrivateCACert returns the name of a ConfigMap containing any private CA certificates issued by TLS proxies that intercept outbound traffic in an end customer's environment. | ||
|
||
You can use this template function to mount the specified ConfigMap so your containers can access the internet through enterprise proxies that issue their own TLS certificates in order to inspect traffic. | ||
When the ConfigMap returned by PrivateCACert is mounted, your application containers can then trust the private CA certificates issued by TLS proxies. This allows your application to make outbound internet connections in customer environments without getting TLS errors. | ||
|
||
For Replicated Embedded Cluster installations on VMs or bare metal servers, you must manually mount the ConfigMap returned by the PrivateCACert template function to ensure that your application trusts the private TLS certificates. Some examples of how to mount the ConfigMap include: | ||
paigecalvert marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Set the `NODE_EXTRA_CA_CERTS` environment variable to append the CAs from the ConfigMap to any existing CAs in the container | ||
paigecalvert marked this conversation as resolved.
Show resolved
Hide resolved
|
||
* Mount the CAs at `/certs` and set the `SSL_CERT_DIR` environment variable to `/certs` | ||
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.
I wasn't sure how useful these examples were and/or if this is something we'd want to go into greater detail on. Do you think they are good to mention? Anything you'd add? We could also do a follow up story to expand if you think it requires more in-depth docs 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. The issue carto ran into is that they wanted to trust the default certs as well as the ones set by the end user for kots existing installs. Setting For example, if this is debian/ubuntu, they could mount the dir as a subpath under https://superuser.com/questions/437330/how-do-you-add-a-certificate-authority-ca-to-ubuntu |
||
|
||
For existing cluster installations with KOTS, KOTS automatically mounts the ConfigMap as a volume in the kotsadm container at `/certs`. Each key in the ConfigMap is created as a file, with its value as file's contents. KOTS then sets the `SSL_CERT_DIR` environment variable in the kotsadm container to `/certs`. `SSL_CERT_DIR` is a common environment variable that is supported by most tools and languages to append certificates to the trust store. | ||
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.
Pulled this paragraph from the support issue https://github.com/replicated-collab/carto-replicated/issues/67 Same as the comment above, not 100% sure that this only happens in existing cluster installations
paigecalvert marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
<details> | ||
<summary>Where does the ConfigMap returned by the PrivateCACert template function come from?</summary> | ||
|
||
The ConfigMap returned by the PrivateCACert template function has a different source depending on if the user is installing with Replicated Embedded Cluster on a VM or bare metal server, or with KOTS in an existing cluster: | ||
|
||
* For Embedded Cluster installations, the ConfigMap returned by PrivateCACert contains the CA trust store from the host. Embedded Cluster determines the CA trust store by first checking the `SSL_CERT_FILE` environment variable. If `SSL_CERT_FILE` is not set, Embedded Cluster then searches common certificate paths and uses the first valid certificate file found. Embedded Cluster than adds | ||
paigecalvert marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
* For KOTS installations in existing clusters, the end user passes the ConfigMap to the `install` command using the `--private-ca-configmap` flag. For more information, see [install](/reference/kots-cli-install). | ||
</details> | ||
paigecalvert marked this conversation as resolved.
Show resolved
Hide resolved
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. ^ moved all the info about what to do if you want to do mount the configmap in your app container to a separate dropdown. messaging tells people:
|
||
|
||
:::note | ||
This function returns the name of the ConfigMap even if the ConfigMap has no entries. If no ConfigMap exists, this function returns the empty string. | ||
PrivateCACert returns the name of the ConfigMap even if the ConfigMap has no entries. If no ConfigMap exists, PrivateCACert returns the empty string. | ||
::: | ||
|
||
## Cluster Information Functions | ||
|
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 isnt necessarily true. It really contains what it says in your bullets below, the file provided by the end user in kots installs or the host ca trust store in EC installs.