Skip to content

Commit

Permalink
fix docs for kuberentes and Nomad
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholasjackson committed Apr 5, 2024
1 parent fddfa2f commit 740d6db
Show file tree
Hide file tree
Showing 4 changed files with 79 additions and 25 deletions.
1 change: 1 addition & 0 deletions src/config/navigation.jsx
Expand Up @@ -42,6 +42,7 @@ export const navigation = [
{ title: 'Build', href: '/docs/resources/build/' },
{ title: 'Chapter', href: '/docs/resources/docs/chapter' },
{ title: 'Container', href: '/docs/resources/container/container' },
{ title: 'Container Registry', href: '/docs/resources/registry/container_registry' },
{ title: 'Copy', href: '/docs/resources/copy' },
{ title: 'Docs', href: '/docs/resources/docs/docs' },
{ title: 'Exec', href: '/docs/resources/exec' },
Expand Down
14 changes: 2 additions & 12 deletions src/pages/docs/resources/k8s/kubernetes_cluster.mdx
Expand Up @@ -297,7 +297,7 @@ resource "ingress" "fake_service" {
}
output "VAULT_ADDR" {
value = resource.ingress.vault_http.address
value = "http://${resource.ingress.vault_http.local_address}"
}
output "KUBECONFIG" {
Expand All @@ -314,14 +314,4 @@ an image cache that runs in Docker. After the first pull all images are subseque
pulled from the image cache not the public internet. This cache is global to
all Nomad and Kubernetes clusters created with Jumppad.

Currently images from the following registries are cached:
* k8s.gcr.io
* gcr.io
* asia.gcr.io
* eu.gcr.io
* us.gcr.io
* quay.io
* ghcr.io"
* docker.io

To clear the cache, you can use the `jumppad purge`.
For more information on the image cache see the [container_registry](/docs/resources/registry/container_registry) resource.
16 changes: 3 additions & 13 deletions src/pages/docs/resources/nomad/nomad_cluster.mdx
Expand Up @@ -258,7 +258,7 @@ resource "nomad_cluster" "dev" {
}
resource "nomad_job" "example_1" {
cluster = resource.nomad_cluster.dev.meta.id
cluster = resource.nomad_cluster.dev
paths = ["./app_config/example1.nomad"]
Expand All @@ -272,7 +272,7 @@ resource "ingress" "fake_service_1" {
port = 19090
target {
id = resource.nomad_cluster.dev.meta.id
resource = resource.nomad_cluster.dev
named_port = "http"
config = {
Expand All @@ -293,14 +293,4 @@ an image cache that runs in Docker. After the first pull all images are subseque
pulled from the image cache not the public internet. This cache is global to
all Nomad and Kubernetes clusters created with Jumppad.

Currently images from the following registries are cached:
* k8s.gcr.io
* gcr.io
* asia.gcr.io
* eu.gcr.io
* us.gcr.io
* quay.io
* ghcr.io"
* docker.io

To clear the cache, you can use the `jumppad purge`.
For more information on the image cache see the [container_registry](/docs/resources/registry/container_registry) resource.
73 changes: 73 additions & 0 deletions src/pages/docs/resources/registry/container_registry.mdx
@@ -0,0 +1,73 @@
import MetaProperties from "../shared/meta.mdx"

# Container Registry `container_registry`

<Intro>
To save bandwidth all containers launched in Kubernetes and Nomad clusters are pulled through
an image cache that is automatically started whenever you run `jumppad up`. After the first
pull all images are subsequently pulled from the image cache not the public internet.

Currently `public` images from the following registries are cached:
* docker.io
* k8s.gcr.io
* gcr.io
* asia.gcr.io
* eu.gcr.io
* us.gcr.io
* quay.io
* ghcr.io
* docker.pkg.github.com

To cache private images or to enable the pull through cache for registires that are not listed above,
you can use the `container_registry` resource.

</Intro>

<Properties>
<Property name="hostname" type="string" required="true" value="">
The hostname of the registry to add to the pull through cache.
</Property>
<Property name="auth" type="#registry_auth" required="false" value="">
The authentication information for the registry, if not provided the registry is assumed to be public.
</Property>
</Properties>

### registry_auth

<Properties>
<Property name="hostname" type="string" required="false" value="">
The hostname to use for authentication, if not provided the hostname of the registry is used.
</Property>
<Property name="username" type="string" required="true" value="">
The username to authenticate with the registry.
</Property>
<Property name="password" type="string" required="true" value="">
The password to authenticate with the registry.
</Property>
</Properties>


<MetaProperties/>

## Examples

### Unauthenticated Registry

```hcl
resource "container_registry" "noauth" {
hostname = "noauth-registry.demo.gs" // cache can not resolve local jumppad.dev dns for some reason,
// using external dns mapped to the local ip address
}
```

### Authenticated Registry

```hcl
resource "container_registry" "auth" {
hostname = "auth-registry.demo.gs"
auth {
username = "admin"
password = "password"
}
}
```

0 comments on commit 740d6db

Please sign in to comment.