Skip to content

Commit

Permalink
Reverted docs until v0.3.4 is released
Browse files Browse the repository at this point in the history
  • Loading branch information
ellistarn committed Sep 23, 2021
1 parent b780af4 commit a9ebdb2
Show file tree
Hide file tree
Showing 4 changed files with 142 additions and 72 deletions.
160 changes: 121 additions & 39 deletions website/content/en/docs/Reference/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,83 @@ title: "API Reference"
linkTitle: "API Reference"
weight: 70
---


<p>Packages:</p>
<ul>
<li>
<a href="#karpenter.sh%2fv1alpha4">karpenter.sh/v1alpha4</a>
<a href="#karpenter.sh%2fv1alpha3">karpenter.sh/v1alpha3</a>
</li>
</ul>
<h2 id="karpenter.sh/v1alpha4">karpenter.sh/v1alpha4</h2>
<h2 id="karpenter.sh/v1alpha3">karpenter.sh/v1alpha3</h2>
<p>
<p>Package v1alpha4 contains API Schema definitions for the v1alpha4 API group</p>
<p>Package v1alpha3 contains API Schema definitions for the v1alpha3 API group</p>
</p>
Resource Types:
<ul></ul>
<h3 id="karpenter.sh/v1alpha4.Constraints">Constraints
<h3 id="karpenter.sh/v1alpha3.Cluster">Cluster
</h3>
<p>
(<em>Appears on:</em>
<a href="#karpenter.sh/v1alpha4.ProvisionerSpec">ProvisionerSpec</a>)
<a href="#karpenter.sh/v1alpha3.ProvisionerSpec">ProvisionerSpec</a>)
</p>
<p>
<p>Cluster configures the cluster that the provisioner operates against. If
not specified, it will default to using the controller&rsquo;s kube-config.</p>
</p>
<table>
<thead>
<tr>
<th>Field</th>
<th>Description</th>
</tr>
</thead>
<tbody>
<tr>
<td>
<code>endpoint</code><br/>
<em>
string
</em>
</td>
<td>
<p>Endpoint is required for nodes to connect to the API Server.</p>
</td>
</tr>
<tr>
<td>
<code>caBundle</code><br/>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>CABundle used by nodes to verify API Server certificates. If omitted (nil),
it will be dynamically loaded at runtime from the in-cluster configuration
file /var/run/secrets/kubernetes.io/serviceaccount/ca.crt.
An empty value (&ldquo;&rdquo;) can be used to signal that no CABundle should be used.</p>
</td>
</tr>
<tr>
<td>
<code>name</code><br/>
<em>
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>Name may be required to detect implementing cloud provider resources.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="karpenter.sh/v1alpha3.Constraints">Constraints
</h3>
<p>
(<em>Appears on:</em>
<a href="#karpenter.sh/v1alpha3.ProvisionerSpec">ProvisionerSpec</a>)
</p>
<p>
<p>Constraints are applied to all nodes created by the provisioner. They can be
Expand All @@ -46,8 +106,7 @@ overriden by NodeSelectors at the pod level.</p>
<em>(Optional)</em>
<p>Taints will be applied to every node launched by the Provisioner. If
specified, the provisioner will not provision nodes for pods that do not
have matching tolerations. Additional taints will be created that match
pod tolerations on a per-node basis.</p>
have matching tolerations.</p>
</td>
</tr>
<tr>
Expand All @@ -59,7 +118,9 @@ map[string]string
</td>
<td>
<em>(Optional)</em>
<p>Labels will be applied to every node launched by the Provisioner.</p>
<p>Labels will be applied to every node launched by the Provisioner unless
overriden by pod node selectors. Well known labels control provisioning
behavior. Additional labels may be supported by your cloudprovider.</p>
</td>
</tr>
<tr>
Expand All @@ -72,7 +133,8 @@ map[string]string
<td>
<em>(Optional)</em>
<p>Zones constrains where nodes will be launched by the Provisioner. If
unspecified, defaults to all zones in the region.</p>
unspecified, defaults to all zones in the region. Cannot be specified if
label &ldquo;topology.kubernetes.io/zone&rdquo; is specified.</p>
</td>
</tr>
<tr>
Expand All @@ -85,14 +147,15 @@ unspecified, defaults to all zones in the region.</p>
<td>
<em>(Optional)</em>
<p>InstanceTypes constrains which instances types will be used for nodes
launched by the Provisioner. If unspecified, defaults to all types.</p>
launched by the Provisioner. If unspecified, it will support all types.
Cannot be specified if label &ldquo;node.kubernetes.io/instance-type&rdquo; is specified.</p>
</td>
</tr>
<tr>
<td>
<code>architectures</code><br/>
<code>architecture</code><br/>
<em>
[]string
string
</em>
</td>
<td>
Expand All @@ -102,30 +165,19 @@ launched by the Provisioner. If unspecified, defaults to all types.</p>
</tr>
<tr>
<td>
<code>operatingSystems</code><br/>
<code>operatingSystem</code><br/>
<em>
[]string
string
</em>
</td>
<td>
<em>(Optional)</em>
<p>OperatingSystem constrains the underlying node operating system</p>
</td>
</tr>
<tr>
<td>
<code>provider</code><br/>
<em>
k8s.io/apimachinery/pkg/runtime.RawExtension
</em>
</td>
<td>
<p>Provider contains fields specific to your cloudprovider.</p>
</td>
</tr>
</tbody>
</table>
<h3 id="karpenter.sh/v1alpha4.Provisioner">Provisioner
<h3 id="karpenter.sh/v1alpha3.Provisioner">Provisioner
</h3>
<p>
<p>Provisioner is the Schema for the Provisioners API</p>
Expand Down Expand Up @@ -156,7 +208,7 @@ Refer to the Kubernetes API documentation for the fields of the
<td>
<code>spec</code><br/>
<em>
<a href="#karpenter.sh/v1alpha4.ProvisionerSpec">
<a href="#karpenter.sh/v1alpha3.ProvisionerSpec">
ProvisionerSpec
</a>
</em>
Expand All @@ -167,9 +219,22 @@ ProvisionerSpec
<table>
<tr>
<td>
<code>cluster</code><br/>
<em>
<a href="#karpenter.sh/v1alpha3.Cluster">
Cluster
</a>
</em>
</td>
<td>
<p>Cluster that launched nodes connect to.</p>
</td>
</tr>
<tr>
<td>
<code>Constraints</code><br/>
<em>
<a href="#karpenter.sh/v1alpha4.Constraints">
<a href="#karpenter.sh/v1alpha3.Constraints">
Constraints
</a>
</em>
Expand All @@ -178,6 +243,7 @@ Constraints
<p>
(Members of <code>Constraints</code> are embedded into this type.)
</p>
<em>(Optional)</em>
<p>Constraints are applied to all nodes launched by this provisioner.</p>
</td>
</tr>
Expand All @@ -191,7 +257,7 @@ int64
<td>
<em>(Optional)</em>
<p>TTLSecondsAfterEmpty is the number of seconds the controller will wait
before attempting to delete a node, measured from when the node is
before attempting to terminate a node, measured from when the node is
detected to be empty. A Node is considered to be empty when it does not
have pods scheduled to it, excluding daemonsets.</p>
<p>Termination due to underutilization is disabled if this field is not set.</p>
Expand Down Expand Up @@ -220,7 +286,7 @@ memory leak protection, and disruption testing.</p>
<td>
<code>status</code><br/>
<em>
<a href="#karpenter.sh/v1alpha4.ProvisionerStatus">
<a href="#karpenter.sh/v1alpha3.ProvisionerStatus">
ProvisionerStatus
</a>
</em>
Expand All @@ -230,11 +296,11 @@ ProvisionerStatus
</tr>
</tbody>
</table>
<h3 id="karpenter.sh/v1alpha4.ProvisionerSpec">ProvisionerSpec
<h3 id="karpenter.sh/v1alpha3.ProvisionerSpec">ProvisionerSpec
</h3>
<p>
(<em>Appears on:</em>
<a href="#karpenter.sh/v1alpha4.Provisioner">Provisioner</a>)
<a href="#karpenter.sh/v1alpha3.Provisioner">Provisioner</a>)
</p>
<p>
<p>ProvisionerSpec is the top level provisioner specification. Provisioners
Expand All @@ -243,8 +309,9 @@ status=true]. Node configuration is driven by through a combination of
provisioner specification (defaults) and pod scheduling constraints
(overrides). A single provisioner is capable of managing highly diverse
capacity within a single cluster and in most cases, only one should be
necessary. It&rsquo;s possible to define multiple provisioners. These provisioners
may have different defaults and can be specifically targeted by pods using
necessary. For advanced use cases like workload separation and sharding, it&rsquo;s
possible to define multiple provisioners. These provisioners may have
different defaults and can be specifically targeted by pods using
pod.spec.nodeSelector[&ldquo;karpenter.sh/provisioner-name&rdquo;]=$PROVISIONER_NAME.</p>
</p>
<table>
Expand All @@ -257,9 +324,22 @@ pod.spec.nodeSelector[&ldquo;karpenter.sh/provisioner-name&rdquo;]=$PROVISIONER_
<tbody>
<tr>
<td>
<code>cluster</code><br/>
<em>
<a href="#karpenter.sh/v1alpha3.Cluster">
Cluster
</a>
</em>
</td>
<td>
<p>Cluster that launched nodes connect to.</p>
</td>
</tr>
<tr>
<td>
<code>Constraints</code><br/>
<em>
<a href="#karpenter.sh/v1alpha4.Constraints">
<a href="#karpenter.sh/v1alpha3.Constraints">
Constraints
</a>
</em>
Expand All @@ -268,6 +348,7 @@ Constraints
<p>
(Members of <code>Constraints</code> are embedded into this type.)
</p>
<em>(Optional)</em>
<p>Constraints are applied to all nodes launched by this provisioner.</p>
</td>
</tr>
Expand All @@ -281,7 +362,7 @@ int64
<td>
<em>(Optional)</em>
<p>TTLSecondsAfterEmpty is the number of seconds the controller will wait
before attempting to delete a node, measured from when the node is
before attempting to terminate a node, measured from when the node is
detected to be empty. A Node is considered to be empty when it does not
have pods scheduled to it, excluding daemonsets.</p>
<p>Termination due to underutilization is disabled if this field is not set.</p>
Expand All @@ -305,11 +386,11 @@ memory leak protection, and disruption testing.</p>
</tr>
</tbody>
</table>
<h3 id="karpenter.sh/v1alpha4.ProvisionerStatus">ProvisionerStatus
<h3 id="karpenter.sh/v1alpha3.ProvisionerStatus">ProvisionerStatus
</h3>
<p>
(<em>Appears on:</em>
<a href="#karpenter.sh/v1alpha4.Provisioner">Provisioner</a>)
<a href="#karpenter.sh/v1alpha3.Provisioner">Provisioner</a>)
</p>
<p>
<p>ProvisionerStatus defines the observed state of Provisioner</p>
Expand Down Expand Up @@ -353,5 +434,6 @@ its target, and indicates whether or not those conditions are met.</p>
<hr/>
<p><em>
Generated with <code>gen-crd-api-reference-docs</code>
on git commit <code>bf8ae63</code>.
on git commit <code>f37f9ba</code>.
</em></p>

4 changes: 2 additions & 2 deletions website/content/en/docs/faqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ weight: 30

## General
### How does a Provisioner decide to manage a particular node?
Karpenter will only take action on nodes that it provisions. All nodes launched by Karpenter will be labeled with `karpenter.sh/provisioner-name`.
Karpenter will only take action on nodes that it provisions. All nodes launched by Karpenter will contain be labeled with `karpenter.sh/provisioner-name`.
## Compatibility
### Which Kubernetes versions does Karpenter support?
Karpenter releases on a similar cadence to upstream Kubernetes releases. Currently, Karpenter is compatible with Kubernetes versions v1.19+. However, this may change in the future as Karpenter takes dependencies on new Kubernetes features.
Expand Down Expand Up @@ -38,7 +38,7 @@ Each Provisioner is capable of defining heterogenous nodes across multiple avail
By default, pods will use the rules defined by a Provisioner named `default`. This is analogous to the `default` scheduler. To select an alternative provisioner, use the node selector `karpenter.sh/provisioner-name: alternative-provisioner`. You must either define a default provisioner or explicitly specify `karpenter.sh/provisioner-name` node selector.
## Deprovisioning
### How does Karpenter decide which nodes it can terminate?
Karpenter will only terminate nodes that it manages. Nodes will be considered for termination due to expiry or emptiness (see below).
Nodes will only terminate nodes that it manages. Nodes will be considered for termination due to expiry or emptiness (see below).
### When does Karpenter terminate empty nodes?
Nodes are considered empty when they do not have any pods scheduled to them. Daemonsets pods and Failed pods are ignored. Karpenter will send a deletion request to the Kubernetes API, and graceful termination will be handled by termination finalizer. Karpenter will wait for the duration of `ttlSecondsAfterUnderutilized` to terminate an empty node. If `ttlSecondsAfterUnderutilized` is unset, **which it is by default**, Karpenter will not terminate nodes once they are empty.
### When does Karpenter terminate expired nodes?
Expand Down
11 changes: 4 additions & 7 deletions website/content/en/docs/getting-started/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,17 +170,14 @@ Review the [provsioner CRD](/docs/provisioner-crd) for more information. For exa

```bash
cat <<EOF | kubectl apply -f -
apiVersion: karpenter.sh/v1alpha4
apiVersion: karpenter.sh/v1alpha3
kind: Provisioner
metadata:
name: default
spec:
provider:
instanceProfile: KarpenterNodeInstanceProfile-${CLUSTER_NAME}
capacityType: spot
cluster:
name: ${CLUSTER_NAME}
endpoint: $(aws eks describe-cluster --name ${CLUSTER_NAME} --query "cluster.endpoint" --output json)
cluster:
name: ${CLUSTER_NAME}
endpoint: $(aws eks describe-cluster --name ${CLUSTER_NAME} --query "cluster.endpoint" --output json)
ttlSecondsAfterEmpty: 30
EOF
```
Expand Down
Loading

0 comments on commit a9ebdb2

Please sign in to comment.